Commit ad9e764f authored by abicur's avatar abicur

[fix] Add blur on main window close and remove unnecessary condition in "Show on unread"

parent 145eda6a
......@@ -41,6 +41,8 @@ const attachWindowStateHandling = (mainWindow) => {
});
const close = () => {
mainWindow.blur();
if (process.platform === 'darwin' || state.hideOnClose) {
mainWindow.hide();
} else if (process.platform === 'win32') {
......
......@@ -173,8 +173,7 @@ export default () => {
webview.on('ipc-message-unread-changed', (hostUrl, [count]) => {
if (typeof count === 'number' && localStorage.getItem('showWindowOnUnreadChanged') === 'true') {
const mainWindow = remote.getCurrentWindow();
const isNeededToShow = !mainWindow.isFocused() || (mainWindow.isFocused() && !mainWindow.isVisible());
if (isNeededToShow) {
if (!mainWindow.isFocused()) {
mainWindow.once('focus', () => mainWindow.flashFrame(false));
mainWindow.showInactive();
mainWindow.flashFrame(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment