Call Navigator::setAppBadge in Electron for Windows badges

This commit is contained in:
Michael Telatynski 2023-05-24 11:34:55 +01:00
parent 0a5173f258
commit 83cd189984
No known key found for this signature in database
GPG Key ID: A2B008A5F49F5D0D

View File

@ -217,6 +217,10 @@ export default class ElectronPlatform extends VectorBasePlatform {
super.setNotificationCount(count); super.setNotificationCount(count);
window.electron!.send("setBadgeCount", count); window.electron!.send("setBadgeCount", count);
// Windows doesn't support app badgeCount so we have to call this too
navigator.setAppBadge?.(count).catch((e) => {
logger.error("Failed to update app badge", e);
});
} }
public supportsNotifications(): boolean { public supportsNotifications(): boolean {