From 63cad6b05b48bfa182f13227468125949845ab78 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 29 Jul 2021 10:05:01 +1000 Subject: [PATCH] test with tray icon with default icon 1024 px --- app/tray_icon.js | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/app/tray_icon.js b/app/tray_icon.js index fa842a9aa..3f4c3319f 100644 --- a/app/tray_icon.js +++ b/app/tray_icon.js @@ -7,16 +7,7 @@ let trayContextMenu = null; let tray = null; function createTrayIcon(getMainWindow, messages) { - // A smaller icon is needed on macOS - const iconSize = process.platform === 'darwin' ? '16' : '256'; - const iconNoNewMessages = path.join( - __dirname, - '..', - 'images', - 'session', - `session_icon_${iconSize}.png` - ); - + const iconNoNewMessages = path.join(__dirname, '..', 'images', 'session', `session_icon.png`); tray = new Tray(iconNoNewMessages); tray.forceOnTop = mainWindow => { @@ -79,15 +70,8 @@ function createTrayIcon(getMainWindow, messages) { tray.setContextMenu(trayContextMenu); }; - tray.updateIcon = unreadCount => { - let image; - - if (unreadCount > 0) { - const filename = `${String(unreadCount >= 10 ? 10 : unreadCount)}.png`; - image = path.join(__dirname, '..', 'images', 'alert', iconSize, filename); - } else { - image = iconNoNewMessages; - } + tray.updateIcon = () => { + const image = iconNoNewMessages; if (!fs.existsSync(image)) { console.log('tray.updateIcon: Image for tray update does not exist!');