diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 45e59313a9..806cd0e5bb 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -591,6 +591,14 @@ "messageformat": "This group is invalid. Please create a new group.", "description": "Displayed when a user can't send a message because something has gone wrong in the conversation." }, + "icu:taskbarMarkedUnread": { + "messageformat": "Marked Unread", + "description": "(Deleted 2024/03/20) On Windows, description for screen readers for the OS taskbar icon's overlay badge when the user has marked chat(s) as unread." + }, + "icu:taskbarUnreadMessages": { + "messageformat": "{count, plural, one {# Unread Message} other {# Unread Messages}}", + "description": "(Deleted 2024/03/20) On Windows, description for screen readers for the OS taskbar icon's overlay badge when there are unread messages." + }, "icu:scrollDown": { "messageformat": "Scroll to bottom of chat", "description": "Alt text for button to take user down to bottom of conversation, shown when user scrolls up" @@ -611,14 +619,6 @@ "messageformat": "{count, plural, one {# Unread Message} other {# Unread Messages}}", "description": "Text for unread message separator, with count" }, - "icu:taskbarMarkedUnread": { - "messageformat": "Marked Unread", - "description": "On Windows, description for screen readers for the OS taskbar icon's overlay badge when the user has marked chat(s) as unread." - }, - "icu:taskbarUnreadMessages": { - "messageformat": "{count, plural, one {# Unread Message} other {# Unread Messages}}", - "description": "On Windows, description for screen readers for the OS taskbar icon's overlay badge when there are unread messages." - }, "icu:messageHistoryUnsynced": { "messageformat": "For your security, chat history isn't transferred to new linked devices.", "description": "Shown in the conversation history when a user links a new device to explain what is not supported." diff --git a/app/main.ts b/app/main.ts index 9c3cdfd1d2..45c6831a81 100644 --- a/app/main.ts +++ b/app/main.ts @@ -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); } diff --git a/images/unread-icon/1.png b/images/unread-icon/1.png deleted file mode 100644 index 842d2f2ddd..0000000000 Binary files a/images/unread-icon/1.png and /dev/null differ diff --git a/images/unread-icon/2.png b/images/unread-icon/2.png deleted file mode 100644 index 767d459c8f..0000000000 Binary files a/images/unread-icon/2.png and /dev/null differ diff --git a/images/unread-icon/3.png b/images/unread-icon/3.png deleted file mode 100644 index 3bf14aaf54..0000000000 Binary files a/images/unread-icon/3.png and /dev/null differ diff --git a/images/unread-icon/4.png b/images/unread-icon/4.png deleted file mode 100644 index e1d4e7e399..0000000000 Binary files a/images/unread-icon/4.png and /dev/null differ diff --git a/images/unread-icon/5.png b/images/unread-icon/5.png deleted file mode 100644 index f50dbcf191..0000000000 Binary files a/images/unread-icon/5.png and /dev/null differ diff --git a/images/unread-icon/6.png b/images/unread-icon/6.png deleted file mode 100644 index 50f7261cea..0000000000 Binary files a/images/unread-icon/6.png and /dev/null differ diff --git a/images/unread-icon/7.png b/images/unread-icon/7.png deleted file mode 100644 index 87a7084ddb..0000000000 Binary files a/images/unread-icon/7.png and /dev/null differ diff --git a/images/unread-icon/8.png b/images/unread-icon/8.png deleted file mode 100644 index 5fca2fd6be..0000000000 Binary files a/images/unread-icon/8.png and /dev/null differ diff --git a/images/unread-icon/9-plus.png b/images/unread-icon/9-plus.png deleted file mode 100644 index 5facbea074..0000000000 Binary files a/images/unread-icon/9-plus.png and /dev/null differ diff --git a/images/unread-icon/9.png b/images/unread-icon/9.png deleted file mode 100644 index 0e81060472..0000000000 Binary files a/images/unread-icon/9.png and /dev/null differ diff --git a/images/unread-icon/marked-unread.png b/images/unread-icon/marked-unread.png deleted file mode 100644 index a38f9f6558..0000000000 Binary files a/images/unread-icon/marked-unread.png and /dev/null differ diff --git a/package.json b/package.json index c94c96a3ec..29dfa2527f 100644 --- a/package.json +++ b/package.json @@ -288,7 +288,7 @@ "csv-parse": "5.5.2", "danger": "11.1.2", "debug": "4.3.3", - "electron": "29.1.0", + "electron": "29.1.5", "electron-builder": "24.6.3", "electron-mocha": "12.2.0", "endanger": "7.0.4", diff --git a/ts/util/unreadIcon.ts b/ts/util/unreadIcon.ts deleted file mode 100644 index f68221f376..0000000000 --- a/ts/util/unreadIcon.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2024 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -import { join } from 'path'; -import type { NativeImage } from 'electron'; -import { nativeImage } from 'electron'; - -export function getUnreadIcon(unreadCount: number): NativeImage { - const filename = - unreadCount > 9 ? '9-plus.png' : `${String(unreadCount)}.png`; - const path = join(__dirname, '..', '..', 'images', 'unread-icon', filename); - // if path does not exist, this returns an empty NativeImage - return nativeImage.createFromPath(path); -} - -export function getMarkedUnreadIcon(): NativeImage { - const path = join( - __dirname, - '..', - '..', - 'images', - 'unread-icon', - 'marked-unread.png' - ); - return nativeImage.createFromPath(path); -} diff --git a/yarn.lock b/yarn.lock index 82e94bd036..9a42c724f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9205,10 +9205,10 @@ electron-window@^0.8.0: dependencies: is-electron-renderer "^2.0.0" -electron@29.1.0: - version "29.1.0" - resolved "https://registry.yarnpkg.com/electron/-/electron-29.1.0.tgz#37f0e4915226db3c87bc54b187795272bf61fc39" - integrity sha512-giJVIm0sWVp+8V1GXrKqKTb+h7no0P3ooYqEd34AD9wMJzGnAeL+usj+R0155/0pdvvP1mgydnA7lcaFA2M9lw== +electron@29.1.5: + version "29.1.5" + resolved "https://registry.yarnpkg.com/electron/-/electron-29.1.5.tgz#b745b4d201c1ac9f84d6aa034126288dde34d5a1" + integrity sha512-1uWGRw/ffA62lcrklxGUgVxVtOHojsg/nwsYr+/F9cVjipZJn8iPv/ABGIIexhmUqWcho8BqfTJ4osCBa29gBg== dependencies: "@electron/get" "^2.0.0" "@types/node" "^20.9.0"