Skip to content

explicit convert to nativeImage to stabilise trayIcon on Windows [Electron]#4355

Merged
dbkr merged 1 commit intodevelopfrom
t3chguy/electron/windows_icon_instability
Jun 21, 2017
Merged

explicit convert to nativeImage to stabilise trayIcon on Windows [Electron]#4355
dbkr merged 1 commit intodevelopfrom
t3chguy/electron/windows_icon_instability

Conversation

@t3chguy
Copy link
Copy Markdown
Member

@t3chguy t3chguy commented Jun 19, 2017

fixes that trayIcon.setImage(newFavicon); sometimes threw:

(node:10936) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Error processing argument at index 0, conversion failure from C:\Users\t3chg\AppData\Local\Temp\win32_riot_icon.ico

because even though the API claims it accepts a string sometimes it just fails to want to causing a desync between the number of Unread rooms and the number of Unread rooms in the Favicon.
Also pre-build the defaultIcon for reuse

Signed-off-by: Michael Telatynski 7t3chguy@gmail.com

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Copy link
Copy Markdown
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmm, nice how it will only read ICOs from a file :/

@dbkr dbkr merged commit 7d3f75e into develop Jun 21, 2017
@t3chguy t3chguy deleted the t3chguy/electron/windows_icon_instability branch October 29, 2017 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants