This commit is contained in:
Stanislav Nikitin 2019-01-20 07:52:31 +05:00
parent 97353ead0f
commit 129c7275a7
No known key found for this signature in database
GPG Key ID: 106900B32F8192EE

View File

@ -44,7 +44,7 @@ function createWindow() {
mainWindow.setIcon(normalIcon);
// Tray icon. Do not create it on macOS.
if (app.platform != "darwin") {
if (process.platform != "darwin") {
tray = new Tray(normalIcon);
const contextMenu = Menu.buildFromTemplate([
{ label: 'Open Yandex.Mail window', type: 'normal', click: showHideMainWindow },
@ -87,7 +87,7 @@ app.on('activate', function () {
ipc.on("has-unread", function (event, count) {
mainWindow.setIcon(unreadIcon);
if (app.platform == "darwin") {
if (process.platform == "darwin") {
app.setBadgeCount(count);
} else {
tray.setImage(unreadIcon);
@ -96,7 +96,7 @@ ipc.on("has-unread", function (event, count) {
ipc.on("has-no-unread", function (event, count) {
mainWindow.setIcon(normalIcon);
if (app.platform == "darwin") {
if (process.platform == "darwin") {
app.setBadgeCount(count);
} else {
tray.setImage(unreadIcon);