|
|
@ -1026,11 +1026,7 @@ ipc.on('get-start-in-tray', event => {
|
|
|
|
|
|
|
|
|
|
|
|
ipcMain.on('update-badge-count', (_event, count) => {
|
|
|
|
ipcMain.on('update-badge-count', (_event, count) => {
|
|
|
|
if (app.isReady()) {
|
|
|
|
if (app.isReady()) {
|
|
|
|
if (count === 0) {
|
|
|
|
app.setBadgeCount(isNumber(count) && isFinite(count) && count >= 0 ? count : 0);
|
|
|
|
app.setBadgeCount(0); // Clear the badge
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
app.setBadgeCount(count); // Set the badge count
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|