macOS fixes.
This commit is contained in:
parent
129c7275a7
commit
4a6db42ee3
8
main.js
8
main.js
@ -58,6 +58,8 @@ function createWindow() {
|
|||||||
showHideMainWindow(null, mainWindow, null);
|
showHideMainWindow(null, mainWindow, null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
app.dock.setIcon(normalIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
mainWindow.Notification = function (title, options) {
|
mainWindow.Notification = function (title, options) {
|
||||||
@ -88,7 +90,7 @@ app.on('activate', function () {
|
|||||||
ipc.on("has-unread", function (event, count) {
|
ipc.on("has-unread", function (event, count) {
|
||||||
mainWindow.setIcon(unreadIcon);
|
mainWindow.setIcon(unreadIcon);
|
||||||
if (process.platform == "darwin") {
|
if (process.platform == "darwin") {
|
||||||
app.setBadgeCount(count);
|
app.dock.setIcon(unreadIcon);
|
||||||
} else {
|
} else {
|
||||||
tray.setImage(unreadIcon);
|
tray.setImage(unreadIcon);
|
||||||
}
|
}
|
||||||
@ -97,9 +99,9 @@ ipc.on("has-unread", function (event, count) {
|
|||||||
ipc.on("has-no-unread", function (event, count) {
|
ipc.on("has-no-unread", function (event, count) {
|
||||||
mainWindow.setIcon(normalIcon);
|
mainWindow.setIcon(normalIcon);
|
||||||
if (process.platform == "darwin") {
|
if (process.platform == "darwin") {
|
||||||
app.setBadgeCount(count);
|
app.dock.setIcon(normalIcon);
|
||||||
} else {
|
} else {
|
||||||
tray.setImage(unreadIcon);
|
tray.setImage(normalIcon);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user