From 29441b7ae2a8bd363a3df344b08290eeba72003d Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Thu, 19 Mar 2026 16:20:45 +0100 Subject: [PATCH] fix(tray): prevent stale progress bar events from overriding stopped icon Guard the SET_PROGRESS_BAR tray icon update with an _isRunning check so that late IPC events (e.g. trailing throttle emissions from focus mode) cannot override the correct stopped icon after a task is unset. Closes #3410 --- electron/indicator.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/electron/indicator.ts b/electron/indicator.ts index 5ad9cefde0..5d0ddc6343 100644 --- a/electron/indicator.ts +++ b/electron/indicator.ts @@ -146,7 +146,9 @@ function initListeners(): void { }); ipcMain.on(IPC.SET_PROGRESS_BAR, (ev: IpcMainEvent, { progress }) => { - setTrayIcon(tray, getRunningIconPath(progress)); + if (_isRunning) { + setTrayIcon(tray, getRunningIconPath(progress)); + } // Also update the context menu and tray title during the progress bar tick // This perfectly synchronizes the text "blinking" with the pie chart animation