function setBadgeCount(count) { if (process.platform === 'darwin') { remote.app.setBadgeCount(count); } }
app.on('browser-window-focus', (event, window) => { window.$focus = true; dockNotificationCache[window.id] = 0; if (process.platform === 'darwin' || (process.platform === 'linux' && app.isUnityRunning && app.isUnityRunning())) { app.setBadgeCount(0); } });
ipcMain.on('application:dock-message-notification', function(event, id) { dockNotificationCache[id] = dockNotificationCache[id] + 1; if (process.platform === 'darwin' || (process.platform === 'linux' && app.isUnityRunning && app.isUnityRunning())) { app.setBadgeCount(dockNotificationCache[id]); } if (process.platform === 'darwin') { app.dock.bounce(); } });
ipcMain.on('update-unreads-count', (e, unreadCount) => { if (isDarwin || isLinux) { let isUpdated = config.get('showUnreadBadge') ? app.setBadgeCount(unreadCount) : false; if (!config.get('showUnreadBadge')) { app.setBadgeCount(0); isUpdated = false;
electron.ipcMain.handle(APP_SET_BADGE_COUNT, (() => { var _ref3 = _asyncToGenerator(function* (_, count) { electron.app.setBadgeCount(count); }); return function (_x4, _x5) { return _ref3.apply(this, arguments); }; })());
electron.ipcMain.handle(APP_SET_BADGE_COUNT, (() => { var _ref3 = _asyncToGenerator(function* (_, count) { electron.app.setBadgeCount(count); }); return function (_x4, _x5) { return _ref3.apply(this, arguments); }; })());