apply same image to the window/taskbar too; as per request

LETS MAKE IT CLEAR WE ARE NEEDY AND WANT ATTENTION

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2017-05-17 10:05:50 +01:00
parent 39b6c7c65d
commit 826a571b60

View File

@ -61,7 +61,14 @@ exports.create = function(win, config) {
trayIcon.on('click', toggleWin);
win.webContents.on('page-favicon-updated', function(ev, favicons) {
trayIcon.setImage(nativeImage.createFromDataURL(favicons[0]));
if (favicons && favicons.length > 0 && favicons[0].startsWith('data:')) {
const image = nativeImage.createFromDataURL(favicons[0]);
trayIcon.setImage(image);
win.setIcon(image);
} else {
trayIcon.setImage(config.icon_path);
win.setIcon(config.icon_path);
}
});
win.webContents.on('page-title-updated', function(ev, title) {