Merge pull request #271 from vector-im/t3chguy/fix/16942

This commit is contained in:
Michael Telatynski 2021-10-11 14:59:18 +01:00 committed by GitHub
commit 48b01f7070
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}