fix(plugin): Party mode 🎉
This commit is contained in:
parent
e33ac900bc
commit
abf8667a5d
1 changed files with 11 additions and 8 deletions
|
@ -19,10 +19,7 @@
|
||||||
import { definePluginSettings } from "@api/Settings";
|
import { definePluginSettings } from "@api/Settings";
|
||||||
import { Devs } from "@utils/constants";
|
import { Devs } from "@utils/constants";
|
||||||
import definePlugin, { OptionType } from "@utils/types";
|
import definePlugin, { OptionType } from "@utils/types";
|
||||||
import { findStoreLazy } from "@webpack";
|
import { FluxDispatcher } from "@webpack/common";
|
||||||
import { GenericStore } from "@webpack/common";
|
|
||||||
|
|
||||||
const PoggerModeSettingsStore: GenericStore = findStoreLazy("PoggermodeSettingsStore");
|
|
||||||
|
|
||||||
const enum Intensity {
|
const enum Intensity {
|
||||||
Normal,
|
Normal,
|
||||||
|
@ -61,9 +58,12 @@ export default definePlugin({
|
||||||
});
|
});
|
||||||
|
|
||||||
function setPoggerState(state: boolean) {
|
function setPoggerState(state: boolean) {
|
||||||
Object.assign(PoggerModeSettingsStore.__getLocalVars().state, {
|
FluxDispatcher.dispatch({
|
||||||
|
type: "POGGERMODE_SETTINGS_UPDATE",
|
||||||
|
settings: {
|
||||||
enabled: state,
|
enabled: state,
|
||||||
settingsVisible: 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
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue