From 83cd1899843dfdcad7abba0f7bc9016419764852 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 24 May 2023 11:34:55 +0100 Subject: [PATCH] Call Navigator::setAppBadge in Electron for Windows badges --- src/vector/platform/ElectronPlatform.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index b18b1abe4e..114a31aacf 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -217,6 +217,10 @@ export default class ElectronPlatform extends VectorBasePlatform { super.setNotificationCount(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 {