From 8370ec4852f211cf50f942347bb4bb4184c1a136 Mon Sep 17 00:00:00 2001 From: brad Date: Mon, 23 Mar 2026 17:46:59 -0400 Subject: [PATCH] fix: clear Windows taskbar overlay icon when badge count reaches 0 When desktopAppBadgeCount drops to 0, the overlay variable was set to null and the short-circuit && prevented setOverlayIcon from ever being called. The previous dot would stay on the taskbar indefinitely. Fix by explicitly calling setOverlayIcon(null, '') to clear the overlay when count is 0. --- shared/desktop/app/menu-bar.desktop.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/shared/desktop/app/menu-bar.desktop.tsx b/shared/desktop/app/menu-bar.desktop.tsx index cbc76a7e902f..876381dffc7c 100644 --- a/shared/desktop/app/menu-bar.desktop.tsx +++ b/shared/desktop/app/menu-bar.desktop.tsx @@ -123,11 +123,14 @@ const MenuBar = () => { // to be used as an overlay in the bottom right of the taskbar icon. if (isWindows) { const mw = getMainWindow() - const overlay = - action.payload.desktopAppBadgeCount > 0 - ? getAssetPath('images', 'icons', 'icon-windows-badge.png') - : null - overlay && mw?.setOverlayIcon(Electron.nativeImage.createFromPath(overlay), 'new activity') + if (action.payload.desktopAppBadgeCount > 0) { + mw?.setOverlayIcon( + Electron.nativeImage.createFromPath(getAssetPath('images', 'icons', 'icon-windows-badge.png')), + 'new activity' + ) + } else { + mw?.setOverlayIcon(null, '') + } } break