From e4cde8738eac187013e5c2e94449c1f225d298cf Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 18 Aug 2022 08:36:12 +0200 Subject: [PATCH] stuff --- Library/0BDFDB.plugin.js | 8 -------- Library/_res/0BDFDB.data.json | 1 - Plugins/BDFDB/BDFDB.plugin.js | 8 -------- .../TimedLightDarkMode/TimedLightDarkMode.plugin.js | 12 +----------- 4 files changed, 1 insertion(+), 28 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index b2ce19a297..ce35f838c0 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -8652,14 +8652,6 @@ module.exports = (_ => { if (InternalData.ModuleUtilsConfig.QueuedComponents) for (let type of InternalData.ModuleUtilsConfig.QueuedComponents) if (!PluginStores.patchQueues[type]) PluginStores.patchQueues[type] = {query: [], modules: []}; let languageChangeTimeout; - BDFDB.PatchUtils.patch(BDFDB, Internal.LibraryModules.SettingsUtilsOld, ["updateRemoteSettings", "updateLocalSettings"], {after: e => { - if (e.methodArguments[0] && e.methodArguments[0].locale) { - BDFDB.TimeUtils.clear(languageChangeTimeout); - languageChangeTimeout = BDFDB.TimeUtils.timeout(_ => { - for (let pluginName in PluginStores.loaded) if (PluginStores.loaded[pluginName].started) BDFDB.PluginUtils.translate(PluginStores.loaded[pluginName]); - }, 10000); - } - }}); BDFDB.PatchUtils.patch(BDFDB, Internal.LibraryModules.AppearanceSettingsUtils, "updateLocale", {after: e => { BDFDB.TimeUtils.clear(languageChangeTimeout); languageChangeTimeout = BDFDB.TimeUtils.timeout(_ => { diff --git a/Library/_res/0BDFDB.data.json b/Library/_res/0BDFDB.data.json index 0cea8a4653..7925a4e4b0 100644 --- a/Library/_res/0BDFDB.data.json +++ b/Library/_res/0BDFDB.data.json @@ -118,7 +118,6 @@ "RoleIconUtils": {"props": ["getRoleIconData"]}, "SearchPageUtils": {"props": ["searchNextPage", "searchPreviousPage"]}, "SettingsUtils": {"props": ["ShowCurrentGame", "DeveloperMode"]}, - "SettingsUtilsOld": {"props": ["updateRemoteSettings", "updateLocalSettings"]}, "SimpleMarkdownComponents": {"strings": ["customEmoji", "emojiTooltipPosition", "timestampTooltip"]}, "SimpleMarkdownParser": {"props": ["parseBlock", "parseInline", "defaultOutput"]}, "SlateDraftUtils": {"props": ["getRecentlyEditedDrafts", "getDraft"]}, diff --git a/Plugins/BDFDB/BDFDB.plugin.js b/Plugins/BDFDB/BDFDB.plugin.js index b2ce19a297..ce35f838c0 100644 --- a/Plugins/BDFDB/BDFDB.plugin.js +++ b/Plugins/BDFDB/BDFDB.plugin.js @@ -8652,14 +8652,6 @@ module.exports = (_ => { if (InternalData.ModuleUtilsConfig.QueuedComponents) for (let type of InternalData.ModuleUtilsConfig.QueuedComponents) if (!PluginStores.patchQueues[type]) PluginStores.patchQueues[type] = {query: [], modules: []}; let languageChangeTimeout; - BDFDB.PatchUtils.patch(BDFDB, Internal.LibraryModules.SettingsUtilsOld, ["updateRemoteSettings", "updateLocalSettings"], {after: e => { - if (e.methodArguments[0] && e.methodArguments[0].locale) { - BDFDB.TimeUtils.clear(languageChangeTimeout); - languageChangeTimeout = BDFDB.TimeUtils.timeout(_ => { - for (let pluginName in PluginStores.loaded) if (PluginStores.loaded[pluginName].started) BDFDB.PluginUtils.translate(PluginStores.loaded[pluginName]); - }, 10000); - } - }}); BDFDB.PatchUtils.patch(BDFDB, Internal.LibraryModules.AppearanceSettingsUtils, "updateLocale", {after: e => { BDFDB.TimeUtils.clear(languageChangeTimeout); languageChangeTimeout = BDFDB.TimeUtils.timeout(_ => { diff --git a/Plugins/TimedLightDarkMode/TimedLightDarkMode.plugin.js b/Plugins/TimedLightDarkMode/TimedLightDarkMode.plugin.js index 5b83de12cc..10c324f372 100644 --- a/Plugins/TimedLightDarkMode/TimedLightDarkMode.plugin.js +++ b/Plugins/TimedLightDarkMode/TimedLightDarkMode.plugin.js @@ -83,16 +83,6 @@ module.exports = (_ => { } onStart () { - BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.SettingsUtilsOld, "updateLocalSettings", {after: e => { - if (BDFDB.ObjectUtils.is(e.methodArguments[0]) && e.methodArguments[0].theme && settings.running) { - BDFDB.TimeUtils.clear(changeTimeout); - disableChanging = true; - changeTimeout = BDFDB.TimeUtils.timeout(_ => { - disableChanging = false; - }, 1000*60*10); - } - }}); - BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.AppearanceSettingsUtils, "updateTheme", {after: e => { if (settings.running) { BDFDB.TimeUtils.clear(changeTimeout); @@ -184,7 +174,7 @@ module.exports = (_ => { let theme = BDFDB.DiscordUtils.getTheme(), newTheme = null; if (dark && theme == BDFDB.disCN.themelight) newTheme = "dark"; else if (!dark && theme == BDFDB.disCN.themedark) newTheme = "light"; - if (newTheme) BDFDB.LibraryModules.SettingsUtilsOld && BDFDB.LibraryModules.SettingsUtilsOld.updateLocalSettings({theme: newTheme}) || BDFDB.LibraryModules.AppearanceSettingsUtils.updateTheme(newTheme); + if (newTheme) BDFDB.LibraryModules.AppearanceSettingsUtils.updateTheme(newTheme); } showCurrentTime (grabber) {