Merge pull request #1335 from Bilb/fix-read-setting-marking-read

pull/1338/head
Audric Ackermann 5 years ago committed by GitHub
commit 23a717925b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -65,12 +65,13 @@ function createTrayIcon(getMainWindow, messages) {
trayContextMenu = Menu.buildFromTemplate([ trayContextMenu = Menu.buildFromTemplate([
{ {
id: 'toggleWindowVisibility', id: 'toggleWindowVisibility',
label: messages[mainWindow.isVisible() ? 'hide' : 'show'].message, label:
messages[mainWindow.isVisible() ? 'appMenuHide' : 'show'].message,
click: tray.toggleWindowVisibility, click: tray.toggleWindowVisibility,
}, },
{ {
id: 'quit', id: 'quit',
label: messages.quit.message, label: messages.appMenuQuit.message,
click: app.quit.bind(app), click: app.quit.bind(app),
}, },
]); ]);

@ -391,7 +391,10 @@
this.window.addEventListener('resize', this.onResize); this.window.addEventListener('resize', this.onResize);
this.onFocus = () => { this.onFocus = () => {
if (this.$el.css('display') !== 'none') { if (
this.$el.css('display') !== 'none' &&
this.$el.css('display') !== ''
) {
this.markRead(); this.markRead();
} }
}; };

Loading…
Cancel
Save