From bd2e4a4384804ecf0a17224e415b8048ca504bb4 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 27 Oct 2022 14:45:51 +0200 Subject: [PATCH] stuff --- Plugins/PluginRepo/PluginRepo.plugin.js | 20 +++++++------------- Plugins/ThemeRepo/ThemeRepo.plugin.js | 20 +++++++------------- 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/Plugins/PluginRepo/PluginRepo.plugin.js b/Plugins/PluginRepo/PluginRepo.plugin.js index 26d642640d..0143e5a3a4 100644 --- a/Plugins/PluginRepo/PluginRepo.plugin.js +++ b/Plugins/PluginRepo/PluginRepo.plugin.js @@ -2,7 +2,7 @@ * @name PluginRepo * @author DevilBro * @authorId 278543574059057154 - * @version 2.3.9 + * @version 2.4.0 * @description Allows you to download all Plugins from BD's Website within Discord * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -14,9 +14,7 @@ module.exports = (_ => { const changeLog = { - "fixed": { - "Lags and Crashes": "No Longer breaks" - } + }; return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class { @@ -514,15 +512,11 @@ module.exports = (_ => { onDelete: _ => { if (this.props.deleting) return; this.props.deleting = true; - BDFDB.LibraryRequires.fs.unlink(BDFDB.LibraryRequires.path.join(BDFDB.BDUtils.getPluginsFolder(), this.props.data.rawSourceUrl.split("/").pop()), error => { - delete this.props.deleting; - if (error) BDFDB.NotificationUtils.toast(BDFDB.LanguageUtils.LibraryStringsFormat("delete_fail", `Plugin "${this.props.data.name}"`), {type: "danger"}); - else { - BDFDB.NotificationUtils.toast(BDFDB.LanguageUtils.LibraryStringsFormat("delete_success", `Plugin "${this.props.data.name}"`)); - this.props.data.state = pluginStates.DOWNLOADABLE; - BDFDB.ReactUtils.forceUpdate(this); - } - }); + BDFDB.LibraryRequires.fs.unlinkSync(BDFDB.LibraryRequires.path.join(BDFDB.BDUtils.getPluginsFolder(), this.props.data.rawSourceUrl.split("/").pop())); + delete this.props.deleting; + BDFDB.NotificationUtils.toast(BDFDB.LanguageUtils.LibraryStringsFormat("delete_success", `Plugin "${this.props.data.name}"`)); + this.props.data.state = pluginStates.DOWNLOADABLE; + BDFDB.ReactUtils.forceUpdate(this); } }) ] diff --git a/Plugins/ThemeRepo/ThemeRepo.plugin.js b/Plugins/ThemeRepo/ThemeRepo.plugin.js index 93fb48e391..a3976e1bec 100644 --- a/Plugins/ThemeRepo/ThemeRepo.plugin.js +++ b/Plugins/ThemeRepo/ThemeRepo.plugin.js @@ -2,7 +2,7 @@ * @name ThemeRepo * @author DevilBro * @authorId 278543574059057154 - * @version 2.4.1 + * @version 2.4.2 * @description Allows you to download all Themes from BD's Website within Discord * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -14,9 +14,7 @@ module.exports = (_ => { const changeLog = { - "fixed": { - "Lags and Crashes": "No Longer breaks" - } + }; return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class { @@ -652,15 +650,11 @@ module.exports = (_ => { onDelete: _ => { if (this.props.deleting) return; this.props.deleting = true; - BDFDB.LibraryRequires.fs.unlink(BDFDB.LibraryRequires.path.join(BDFDB.BDUtils.getThemesFolder(), this.props.data.rawSourceUrl.split("/").pop()), error => { - delete this.props.deleting; - if (error) BDFDB.NotificationUtils.toast(BDFDB.LanguageUtils.LibraryStringsFormat("delete_fail", `Theme "${this.props.data.name}"`), {type: "danger"}); - else { - BDFDB.NotificationUtils.toast(BDFDB.LanguageUtils.LibraryStringsFormat("delete_success", `Theme "${this.props.data.name}"`)); - this.props.data.state = themeStates.DOWNLOADABLE; - BDFDB.ReactUtils.forceUpdate(this); - } - }); + BDFDB.LibraryRequires.fs.unlinkSync(BDFDB.LibraryRequires.path.join(BDFDB.BDUtils.getThemesFolder(), this.props.data.rawSourceUrl.split("/").pop())); + delete this.props.deleting; + BDFDB.NotificationUtils.toast(BDFDB.LanguageUtils.LibraryStringsFormat("delete_success", `Theme "${this.props.data.name}"`)); + this.props.data.state = themeStates.DOWNLOADABLE; + BDFDB.ReactUtils.forceUpdate(this); } }) ]