From c4aaf5f3fec8cfc3e94d03ca97a96af8f4808d29 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 20 Oct 2022 12:01:17 +0200 Subject: [PATCH] Update CustomStatusPresets.plugin.js --- .../CustomStatusPresets.plugin.js | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Plugins/CustomStatusPresets/CustomStatusPresets.plugin.js b/Plugins/CustomStatusPresets/CustomStatusPresets.plugin.js index e9304e0b12..bee32f7e81 100644 --- a/Plugins/CustomStatusPresets/CustomStatusPresets.plugin.js +++ b/Plugins/CustomStatusPresets/CustomStatusPresets.plugin.js @@ -2,7 +2,7 @@ * @name CustomStatusPresets * @author DevilBro * @authorId 278543574059057154 - * @version 1.1.3 + * @version 1.1.4 * @description Allows you to save Custom Statuses as Quick Select * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -226,14 +226,13 @@ module.exports = (_ => { onLoad () { _this = this; - this.patchedModules = { - before: { - Menu: "default" - }, - after: { - Account: "render", - CustomStatusModal: "render" - } + this.modulePatches = { + before: [ + "Menu" + ], + after: [ + "CustomStatusModal" + ] }; this.css = ` @@ -404,9 +403,10 @@ module.exports = (_ => { } processCustomStatusModal (e) { + let footer = BDFDB.ReactUtils.findChild(e.returnvalue, {name: "ModalFooter"}); + if (!footer) return; let id = BDFDB.NumberUtils.generateId(Object.keys(presets)); - let footer = BDFDB.ReactUtils.findChild(e.returnvalue, {name: ["ModalFooter", "Footer"]}); - if (footer) footer.props.children.splice(1, 0, BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Button, { + footer.props.children.splice(1, 0, BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Button, { color: BDFDB.disCN.modalcancelbutton, look: BDFDB.LibraryComponents.Button.Looks.LINK, onClick: event => {