From ca9bd5ac149f60e473e593a762cf890dbcf728c5 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Mon, 30 Dec 2024 00:23:53 -0500 Subject: [PATCH] Update StatusWhilePlaying --- .../{ViewRawVariant => iewRawVariant}/index.tsx | 0 src/equicordplugins/statusWhilePlaying.desktop/index.ts | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/equicordplugins/{ViewRawVariant => iewRawVariant}/index.tsx (100%) diff --git a/src/equicordplugins/ViewRawVariant/index.tsx b/src/equicordplugins/iewRawVariant/index.tsx similarity index 100% rename from src/equicordplugins/ViewRawVariant/index.tsx rename to src/equicordplugins/iewRawVariant/index.tsx diff --git a/src/equicordplugins/statusWhilePlaying.desktop/index.ts b/src/equicordplugins/statusWhilePlaying.desktop/index.ts index 0e204457..874055a2 100644 --- a/src/equicordplugins/statusWhilePlaying.desktop/index.ts +++ b/src/equicordplugins/statusWhilePlaying.desktop/index.ts @@ -5,13 +5,13 @@ */ import { definePluginSettings } from "@api/Settings"; +import { getUserSettingLazy } from "@api/UserSettings"; import { EquicordDevs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; -import { findByCodeLazy } from "@webpack"; import { PresenceStore, UserStore } from "@webpack/common"; let savedStatus = ""; -const updateAsync = findByCodeLazy("updateAsync", "status"); +const statusSettings = getUserSettingLazy("status", "status"); const settings = definePluginSettings({ statusToSet: { type: OptionType.SELECT, @@ -49,11 +49,11 @@ export default definePlugin({ if (event.games.length > 0) { if (status !== settings.store.statusToSet) { savedStatus = status; - updateAsync(settings.store.statusToSet); + statusSettings?.updateSetting(settings.store.statusToSet); } } else { if (savedStatus !== "" && savedStatus !== settings.store.statusToSet) - updateAsync(savedStatus); + statusSettings?.updateSetting(savedStatus); } }, }