Upgrade electron to 29.1.5 and revert windows badge fix

This commit is contained in:
ayumi-signal 2024-03-20 14:56:29 -07:00 committed by GitHub
parent 703d5a97e3
commit 0f49d0d391
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 13 additions and 74 deletions

View file

@ -117,7 +117,6 @@ import type { ParsedSignalRoute } from '../ts/util/signalRoutes';
import { parseSignalRoute } from '../ts/util/signalRoutes';
import * as dns from '../ts/util/dns';
import { ZoomFactorService } from '../ts/services/ZoomFactorService';
import { getMarkedUnreadIcon, getUnreadIcon } from '../ts/util/unreadIcon';
const STICKER_CREATOR_PARTITION = 'sticker-creator';
@ -2269,44 +2268,10 @@ ipc.on(
if (process.platform === 'darwin') {
// Will show a ● on macOS when undefined
app.setBadgeCount(undefined);
} else if (process.platform === 'win32') {
// setBadgeCount is unsupported on Windows, so we use setOverlayIcon
let description;
try {
description = getResolvedMessagesLocale().i18n(
'icu:taskbarMarkedUnread'
);
} catch {
description = 'Unread';
}
mainWindow?.setOverlayIcon(getMarkedUnreadIcon(), description);
} else {
// All other OS's need a number
app.setBadgeCount(1);
}
return;
}
if (process.platform === 'win32') {
if (!mainWindow) {
return;
}
let description;
try {
description = getResolvedMessagesLocale().i18n(
'icu:taskbarUnreadMessages',
{ count: badge }
);
} catch {
description = String(badge);
}
if (badge === 0) {
mainWindow.setOverlayIcon(null, '');
} else {
mainWindow.setOverlayIcon(getUnreadIcon(badge), description);
}
} else {
app.setBadgeCount(badge);
}