Fix macOS badge
This commit is contained in:
parent
a8eb8e7372
commit
a7d5fc6503
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue