From 9211db812e938314305cdc4a1bfa4c7e5aa5e536 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 18 Mar 2021 12:12:10 +0100 Subject: [PATCH] Update CustomQuoter.plugin.js --- Plugins/CustomQuoter/CustomQuoter.plugin.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/Plugins/CustomQuoter/CustomQuoter.plugin.js b/Plugins/CustomQuoter/CustomQuoter.plugin.js index 458f946d8f..cca320062b 100644 --- a/Plugins/CustomQuoter/CustomQuoter.plugin.js +++ b/Plugins/CustomQuoter/CustomQuoter.plugin.js @@ -2,7 +2,7 @@ * @name CustomQuoter * @author DevilBro * @authorId 278543574059057154 - * @version 1.2.6 + * @version 1.2.7 * @description Brings back the Quote Feature and allows you to set your own Quote Formats * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -17,13 +17,8 @@ module.exports = (_ => { "info": { "name": "CustomQuoter", "author": "DevilBro", - "version": "1.2.6", + "version": "1.2.7", "description": "Brings back the Quote Feature and allows you to set your own Quote Formats" - }, - "changeLog": { - "improved": { - "Auto New Line": "If there is already some text in your Message Input, then the plugin adds a newline before the quote" - } } }; @@ -372,13 +367,7 @@ module.exports = (_ => { BDFDB.LibraryRequires.electron.clipboard.write({text: text}); BDFDB.NotificationUtils.toast(this.labels.toast_quotecopied, {type: "success"}); } - else { - if (ChannelTextAreaForm) { - let textValue = [ChannelTextAreaForm.state.textValue, text].filter(n => n).join("\n"); - ChannelTextAreaForm.setState({textValue: textValue, richValue: BDFDB.LibraryModules.SlateUtils.deserialize(textValue)}); - } - else BDFDB.LibraryModules.DispatchUtils.ComponentDispatch.dispatchToLastSubscribed(BDFDB.DiscordConstants.ComponentActions.INSERT_TEXT, {content: text}); - } + else BDFDB.LibraryModules.DispatchUtils.ComponentDispatch.dispatchToLastSubscribed(BDFDB.DiscordConstants.ComponentActions.INSERT_TEXT, {content: [ChannelTextAreaForm && ChannelTextAreaForm.state.textValue && "\n", text].filter(n => n).join("")}); } }