From 4a6db42ee3d2084f4f5862efb2fec4097fd96332 Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Sun, 20 Jan 2019 07:58:52 +0500 Subject: [PATCH] macOS fixes. --- main.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index dc1a377..1ca69ce 100644 --- a/main.js +++ b/main.js @@ -58,6 +58,8 @@ function createWindow() { showHideMainWindow(null, mainWindow, null); }); + } else { + app.dock.setIcon(normalIcon); } mainWindow.Notification = function (title, options) { @@ -88,7 +90,7 @@ app.on('activate', function () { ipc.on("has-unread", function (event, count) { mainWindow.setIcon(unreadIcon); if (process.platform == "darwin") { - app.setBadgeCount(count); + app.dock.setIcon(unreadIcon); } else { tray.setImage(unreadIcon); } @@ -97,9 +99,9 @@ ipc.on("has-unread", function (event, count) { ipc.on("has-no-unread", function (event, count) { mainWindow.setIcon(normalIcon); if (process.platform == "darwin") { - app.setBadgeCount(count); + app.dock.setIcon(normalIcon); } else { - tray.setImage(unreadIcon); + tray.setImage(normalIcon); } })