|
|
@ -165,11 +165,11 @@ function createWindow () { |
|
|
|
function updateBadge(title) { |
|
|
|
function updateBadge(title) { |
|
|
|
const messageCount = (/\(([0-9]+)\)/).exec(title); |
|
|
|
const messageCount = (/\(([0-9]+)\)/).exec(title); |
|
|
|
|
|
|
|
|
|
|
|
if (process.platform === 'darwin') { |
|
|
|
if (process.platform === 'win32') { |
|
|
|
app.dock.setBadge(messageCount ? messageCount[1] : ''); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
tray.setBadge(messageCount); |
|
|
|
tray.setBadge(messageCount); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.setBadgeCount(messageCount); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// This method will be called when Electron has finished
|
|
|
|
// This method will be called when Electron has finished
|
|
|
|