From 88eb7832e407725bdd4cd6d4b114820808779144 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Sun, 4 Aug 2024 04:14:23 -0400 Subject: [PATCH] Added some checks --- src/plugins/statusWhilePlaying.desktop/index.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/plugins/statusWhilePlaying.desktop/index.ts b/src/plugins/statusWhilePlaying.desktop/index.ts index 15681d2fa50..5591376a82a 100644 --- a/src/plugins/statusWhilePlaying.desktop/index.ts +++ b/src/plugins/statusWhilePlaying.desktop/index.ts @@ -48,11 +48,14 @@ export default definePlugin({ const status = PresenceStore.getStatus(UserStore.getCurrentUser().id); switch (event.games.length) { case 0: - updateAsync(savedStatus); + if (savedStatus !== "" && savedStatus !== settings.store.statusToSet) + updateAsync(savedStatus); break; default: - savedStatus = status; - updateAsync(settings.store.statusToSet); + if (status !== settings.store.statusToSet) { + savedStatus = status; + updateAsync(settings.store.statusToSet); + } break; } },