From 45fa86b5d3168215824608f028908894ec36d4f7 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Mon, 27 Mar 2023 00:32:29 +0100 Subject: [PATCH] Fix activity state logic (#197) --- src/activity.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/activity.ts b/src/activity.ts index 63619381..c5354fa2 100644 --- a/src/activity.ts +++ b/src/activity.ts @@ -320,10 +320,10 @@ export const getPresenceButtons = async ( let state: "Idle" | "Active" | "Inactive" | undefined = isIdling ? "Idle" : isGitExcluded - ? "Inactive" + ? undefined : status == CURRENT_STATUS.EDITING || status == CURRENT_STATUS.VIEWING || status == CURRENT_STATUS.NOT_IN_FILE || status == CURRENT_STATUS.DEBUGGING ? "Active" - : undefined; + : "Inactive"; if ((!button1Enabled && !button2Enabled) || !state) return []; let isGit = !isGitExcluded && dataClass.gitRemoteUrl; let button1 = buttonValidation(await createButton(replaceAllText, state, isGit, "Button1"), "Button1");