Fix macOS badge

This commit is contained in:
Igor Gassmann 2018-02-24 19:26:49 -05:00
parent a8eb8e7372
commit a7d5fc6503

View file

@ -2,10 +2,10 @@ import { remote } from 'electron';
const application = remote.app;
const { dock } = application;
const win = remote.BrowserWindow.getFocusedWindow();
const browserWindow = remote.getCurrentWindow();
const setBadge = text => {
if (!dock) return;
if (win.isFocused()) return;
if (browserWindow.isFocused()) return;
dock.setBadge(text);
};