fix(system-tray): rename icon files for Windows and Linux
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
@ -16,7 +16,7 @@ const TRAY_ICON_PATH = path.join(
|
||||||
NylasEnv.getConfigDirPath(),
|
NylasEnv.getConfigDirPath(),
|
||||||
'tray',
|
'tray',
|
||||||
'tray-icon.png'
|
'tray-icon.png'
|
||||||
)
|
);
|
||||||
|
|
||||||
|
|
||||||
class SystemTrayIconStore {
|
class SystemTrayIconStore {
|
||||||
|
@ -31,11 +31,11 @@ class SystemTrayIconStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
activate() {
|
activate() {
|
||||||
const iconDir = path.dirname(TRAY_ICON_PATH)
|
const iconDir = path.dirname(TRAY_ICON_PATH);
|
||||||
mkdirpAsync(iconDir).then(()=> {
|
mkdirpAsync(iconDir).then(()=> {
|
||||||
writeFile(TRAY_ICON_PATH, this._icon.toPng())
|
writeFile(TRAY_ICON_PATH, this._icon.toPng())
|
||||||
.then(()=> {
|
.then(()=> {
|
||||||
ipcRenderer.send('update-system-tray', TRAY_ICON_PATH, this._unreadString)
|
ipcRenderer.send('update-system-tray', TRAY_ICON_PATH, this._unreadString);
|
||||||
this._unsubscribe = UnreadBadgeStore.listen(this._onUnreadCountChanged);
|
this._unsubscribe = UnreadBadgeStore.listen(this._onUnreadCountChanged);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
@ -62,7 +62,7 @@ class SystemTrayIconStore {
|
||||||
const outputImg = nativeImage.createFromBuffer(pngData);
|
const outputImg = nativeImage.createFromBuffer(pngData);
|
||||||
return outputImg;
|
return outputImg;
|
||||||
},
|
},
|
||||||
'default': ()=> {
|
'default': () =>
|
||||||
return unreadString !== '0' ? this._unreadIcon : this._baseIcon;
|
return unreadString !== '0' ? this._unreadIcon : this._baseIcon;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -75,8 +75,8 @@ class SystemTrayIconStore {
|
||||||
this._icon = this._getIconImg();
|
this._icon = this._getIconImg();
|
||||||
writeFile(TRAY_ICON_PATH, this._icon.toPng())
|
writeFile(TRAY_ICON_PATH, this._icon.toPng())
|
||||||
.then(() => {
|
.then(() => {
|
||||||
ipcRenderer.send('update-system-tray', TRAY_ICON_PATH, this._unreadString)
|
ipcRenderer.send('update-system-tray', TRAY_ICON_PATH, this._unreadString);
|
||||||
})
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
deactivate() {
|
deactivate() {
|
||||||
|
|