diff options
author | whqwert <94757998+whqwert@users.noreply.github.com> | 2023-10-01 21:19:31 -0500 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-10-02 23:17:51 +0200 |
commit | abf8667a5dd9a4850f84b4918a0f0fa5dbc42b3b (patch) | |
tree | 54124bbd39a4cbfbac9da77125213dfa6c2a7ba9 /src/plugins/partyMode | |
parent | e33ac900bcd6abaf055ecd3f7aaea7fa300c2503 (diff) | |
download | Vencord-abf8667a5dd9a4850f84b4918a0f0fa5dbc42b3b.tar.gz Vencord-abf8667a5dd9a4850f84b4918a0f0fa5dbc42b3b.tar.bz2 Vencord-abf8667a5dd9a4850f84b4918a0f0fa5dbc42b3b.zip |
fix(plugin): Party mode 🎉
Diffstat (limited to 'src/plugins/partyMode')
-rw-r--r-- | src/plugins/partyMode/index.ts | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/plugins/partyMode/index.ts b/src/plugins/partyMode/index.ts index bb822f5..06e8719 100644 --- a/src/plugins/partyMode/index.ts +++ b/src/plugins/partyMode/index.ts @@ -19,10 +19,7 @@ import { definePluginSettings } from "@api/Settings"; import { Devs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; -import { findStoreLazy } from "@webpack"; -import { GenericStore } from "@webpack/common"; - -const PoggerModeSettingsStore: GenericStore = findStoreLazy("PoggermodeSettingsStore"); +import { FluxDispatcher } from "@webpack/common"; const enum Intensity { Normal, @@ -61,9 +58,12 @@ export default definePlugin({ }); function setPoggerState(state: boolean) { - Object.assign(PoggerModeSettingsStore.__getLocalVars().state, { - enabled: state, - settingsVisible: state + FluxDispatcher.dispatch({ + type: "POGGERMODE_SETTINGS_UPDATE", + settings: { + enabled: state, + settingsVisible: state + } }); } @@ -101,5 +101,8 @@ function setSettings(intensity: Intensity) { } } - Object.assign(PoggerModeSettingsStore.__getLocalVars().state, state); + FluxDispatcher.dispatch({ + type: "POGGERMODE_SETTINGS_UPDATE", + settings: state + }); } |