Skip to content

Commit

Permalink
Added some checks
Browse files Browse the repository at this point in the history
  • Loading branch information
thororen1234 committed Aug 4, 2024
1 parent 1a0d41a commit 88eb783
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/plugins/statusWhilePlaying.desktop/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
},
Expand Down

0 comments on commit 88eb783

Please sign in to comment.