Add ability to hide tray icon on non-Mac (which has no tray icon)
This commit is contained in:
parent
6ada5e4397
commit
1498872214
3 changed files with 44 additions and 10 deletions
|
@ -26,6 +26,13 @@ exports.hasTray = function hasTray() {
|
|||
return (trayIcon !== null);
|
||||
};
|
||||
|
||||
exports.destroy = function() {
|
||||
if (trayIcon) {
|
||||
trayIcon.destroy();
|
||||
trayIcon = null;
|
||||
}
|
||||
};
|
||||
|
||||
exports.create = function(config) {
|
||||
// no trays on darwin
|
||||
if (process.platform === 'darwin' || trayIcon) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue