From b662846bf1d21273b626b4c64274e97b50851ceb Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 11 Oct 2021 09:13:30 +0100 Subject: [PATCH] Only set badgeCount on Mac/Linux because Windows is made of fail --- src/electron-main.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/electron-main.ts b/src/electron-main.ts index 33f6a3f..c82e346 100644 --- a/src/electron-main.ts +++ b/src/electron-main.ts @@ -325,7 +325,12 @@ process.on('uncaughtException', function(error) { let focusHandlerAttached = false; ipcMain.on('setBadgeCount', function(ev, count) { - app.badgeCount = count; + if (process.platform !== 'win32') { + // only set badgeCount on Mac/Linux, the docs say that only those platforms support it but turns out Electron + // has some Windows support too, and in some Windows environments this leads to two badges rendering atop + // each other. See https://github.com/vector-im/element-web/issues/16942 + app.badgeCount = count; + } if (count === 0 && mainWindow) { mainWindow.flashFrame(false); }