mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-18 00:46:45 +00:00
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
This commit is contained in:
parent
0385204eb3
commit
29441b7ae2
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue