Skip to content

Commit

Permalink
Merge pull request #2003 from NguyenTranHoangSym/SDA-4329_23.11
Browse files Browse the repository at this point in the history
SDA-4329_23.11: Fixing 4329 & 4327
  • Loading branch information
NguyenTranHoangSym authored Nov 2, 2023
2 parents 063a043 + 66833c1 commit 4fffda1
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/app/stores/window-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class WindowStore {
currentWindow?.hide();
}
} else {
currentWindow.minimize();
currentWindow.hide();
}
}
});
Expand Down Expand Up @@ -94,14 +94,11 @@ export class WindowStore {
currentWindow.id || '',
) as ICustomBrowserWindow;
if (window) {
if (isMac) {
if (currentWindow.isFullScreen) {
fullscreenedWindows.push(currentWindow);
} else if (!currentWindow.minimized && !currentWindow.focused) {
window.showInactive();
}
} else {
window.restore();
if (currentWindow.isFullScreen) {
fullscreenedWindows.push(currentWindow);
} else if (!currentWindow.minimized && !currentWindow.focused) {
window.showInactive();
window.moveTop();
}
if (currentWindow.focused) {
focusedWindowToRestore = window;
Expand All @@ -119,7 +116,6 @@ export class WindowStore {
focusedWindowToRestore,
);

showBadgeCount(presenceStatusStore.getNotificationCount());
const mainWindow = windowHandler.getMainWindow();
if (mainWindow) {
const items = presenceStatus.createThumbarButtons();
Expand All @@ -128,6 +124,8 @@ export class WindowStore {
logger.info('window-store: restoring thumbnail toolbar buttons');
}

showBadgeCount(presenceStatusStore.getNotificationCount());

// Store reset
this.destroyWindowStore();
}
Expand Down Expand Up @@ -187,6 +185,7 @@ export class WindowStore {
} else {
if (windowToFocus) {
windowToFocus?.show();
windowToFocus?.moveTop();
windowHandler.moveSnippingToolWindow(windowToFocus);
}
this.windowsRestored = true;
Expand Down

0 comments on commit 4fffda1

Please sign in to comment.