mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-14 02:47:49 +00:00
Don't create tray form unread counts on Windows + macOS
This commit is contained in:
@@ -181,6 +181,7 @@ ipcRenderer.on('tray', (event, arg) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (process.platform === 'linux')
|
||||||
if (arg === 0) {
|
if (arg === 0) {
|
||||||
unread = arg;
|
unread = arg;
|
||||||
// Message Count // console.log("message count is zero.");
|
// Message Count // console.log("message count is zero.");
|
||||||
@@ -204,10 +205,12 @@ function toggleTray() {
|
|||||||
ConfigUtil.setConfigItem('trayIcon', false);
|
ConfigUtil.setConfigItem('trayIcon', false);
|
||||||
} else {
|
} else {
|
||||||
createTray();
|
createTray();
|
||||||
|
if (process.platform === 'linux') {
|
||||||
renderNativeImage(unread).then(image => {
|
renderNativeImage(unread).then(image => {
|
||||||
window.tray.setImage(image);
|
window.tray.setImage(image);
|
||||||
window.tray.setToolTip(unread + ' unread messages');
|
window.tray.setToolTip(unread + ' unread messages');
|
||||||
});
|
});
|
||||||
|
}
|
||||||
ConfigUtil.setConfigItem('trayIcon', true);
|
ConfigUtil.setConfigItem('trayIcon', true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user