Make number check for windows bagde future-proof
This commit is contained in:
parent
7aad726269
commit
2d6df2fffd
|
@ -195,11 +195,11 @@
|
||||||
app.dock.setBadge(String(arg));
|
app.dock.setBadge(String(arg));
|
||||||
}
|
}
|
||||||
else if (process.platform === "win32") {
|
else if (process.platform === "win32") {
|
||||||
// If we get a . it means there's unread messages. We don't care about that
|
let n = parseInt(arg, 10);
|
||||||
if (arg === '.' || arg === '•') {
|
// Only show notifications with number
|
||||||
|
if (isNaN(n)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let n = parseInt(arg, 10);
|
|
||||||
if (n > 0) {
|
if (n > 0) {
|
||||||
mainWindow.setOverlayIcon(__dirname + '/assets/img/favicon.ico', String(arg));
|
mainWindow.setOverlayIcon(__dirname + '/assets/img/favicon.ico', String(arg));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue