Skip to content

Commit

Permalink
[fix] Add additional condition for option "Show on unread" to show Ro…
Browse files Browse the repository at this point in the history
…cket.Chat window
  • Loading branch information
abicur committed Dec 3, 2018
1 parent b2f9122 commit 1f1adec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/scripts/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ export default () => {
webview.on('ipc-message-unread-changed', (hostUrl, [count]) => {
if (typeof count === 'number' && localStorage.getItem('showWindowOnUnreadChanged') === 'true') {
const mainWindow = remote.getCurrentWindow();
if (!mainWindow.isFocused()) {
const isNeededToShow = !mainWindow.isFocused() || (mainWindow.isFocused() && !mainWindow.isVisible());
if (isNeededToShow) {
mainWindow.once('focus', () => mainWindow.flashFrame(false));
mainWindow.showInactive();
mainWindow.flashFrame(true);
Expand Down

0 comments on commit 1f1adec

Please sign in to comment.