lbry-desktop/src/renderer/util/setBadge.js
2017-12-13 18:36:30 -03:00

13 lines
289 B
JavaScript

const { remote } = require("electron");
const application = remote.app;
const dock = application.dock;
const win = remote.BrowserWindow.getFocusedWindow();
const setBadge = text => {
if (!dock) return;
if (win.isFocused()) return;
dock.setBadge(text);
};
export default setBadge;