From 07f975b967f2e334921abf874ffceabcabd7454c Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 29 Jul 2021 22:33:44 +0200 Subject: [PATCH] Update SpotifyControls.plugin.js --- .../SpotifyControls/SpotifyControls.plugin.js | 24 +++---------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/Plugins/SpotifyControls/SpotifyControls.plugin.js b/Plugins/SpotifyControls/SpotifyControls.plugin.js index 6016909df7..c6b442e42f 100644 --- a/Plugins/SpotifyControls/SpotifyControls.plugin.js +++ b/Plugins/SpotifyControls/SpotifyControls.plugin.js @@ -681,19 +681,6 @@ module.exports = (_ => { } onStart () { - // REMOVE 24.04.2021 - let oldData = BDFDB.DataUtils.load(this); - if (oldData.settings) { - this.settings.general = oldData.settings; - BDFDB.DataUtils.save(this.settings.general, this, "general"); - BDFDB.DataUtils.remove(this, "settings"); - } - if (oldData.buttonConfigs) { - this.settings.buttons = oldData.buttonConfigs; - BDFDB.DataUtils.save(this.settings.buttons, this, "buttons"); - BDFDB.DataUtils.remove(this, "buttonConfigs"); - } - BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.SpotifyTrackUtils, "getActivity", {after: e => { if (e.methodArguments[0] !== false) { if (e.returnValue && e.returnValue.name == "Spotify") this.updatePlayer(e.returnValue); @@ -709,11 +696,11 @@ module.exports = (_ => { return false; }}); - this.forceUpdateAll(); + BDFDB.PatchUtils.forceAllUpdates(this); } onStop () { - this.forceUpdateAll(); + BDFDB.PatchUtils.forceAllUpdates(this); } getSettingsPanel (collapseStates = {}) { @@ -798,14 +785,9 @@ module.exports = (_ => { onSettingsClosed () { if (this.SettingsUpdated) { delete this.SettingsUpdated; - this.forceUpdateAll(); + BDFDB.PatchUtils.forceAllUpdates(this); } } - - forceUpdateAll () { - BDFDB.PatchUtils.forceAllUpdates(this); - BDFDB.DiscordUtils.rerenderAll(); - } processAnalyticsContext (e) { if (e.instance.props.section == BDFDB.DiscordConstants.AnalyticsSections.ACCOUNT_PANEL) e.instance.props.children = [