fix(notification): close visible notifications during destroy on Windows

This commit is contained in:
ZacharyZhang-NY committed 2026-04-16 23:06:35 -04:00
1 parent 5da9945792
commit d019347e03
1 file changed
+5
+5
View File
@@ -195,6 +195,11 @@ export function createNotificationService(deps: NotificationServiceDependencies)
clearTimeout(batch.timer);
}
activeBatches.clear();
// Dismiss any still-visible notifications so Windows toast host does not
// leave ghost toasts after quit.
for (const notification of activeNotifications) {
try { notification.close(); } catch { /* toast may have already closed */ }
}
activeNotifications.clear();
}