Browse Source

Improvements in badge in icon app.

Related to electron/electron#6243
pull/116/head
Ramiro Saenz 9 years ago
parent
commit
cb9d0513e0
  1. 6
      electron/main.js

6
electron/main.js

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

Loading…
Cancel
Save