From 93755c717c55a8f9955ae4da49e054b55a79c566 Mon Sep 17 00:00:00 2001 From: NguyenTranHoangSym <97150869+NguyenTranHoangSym@users.noreply.github.com> Date: Tue, 23 May 2023 17:00:46 +0700 Subject: [PATCH] SDA-4187: Thumbnails will not be restored after screenshot taken (#1862) --- src/app/stores/window-store.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/app/stores/window-store.ts b/src/app/stores/window-store.ts index 00524773..dc205286 100644 --- a/src/app/stores/window-store.ts +++ b/src/app/stores/window-store.ts @@ -1,6 +1,8 @@ import { BrowserWindow } from 'electron'; import { presenceStatusStore } from '.'; import { isMac, isWindowsOS } from '../../common/env'; +import { logger } from '../../common/logger'; +import { presenceStatus } from '../presence-status-handler'; import { ICustomBrowserWindow, windowHandler } from '../window-handler'; import { getWindowByName, showBadgeCount } from '../window-utils'; @@ -104,6 +106,14 @@ export class WindowStore { ); showBadgeCount(presenceStatusStore.getNotificationCount()); + const mainWindow = windowHandler.getMainWindow(); + if (mainWindow) { + const items = presenceStatus.createThumbarButtons(); + presenceStatus.updateSystemTrayPresence(); + mainWindow?.setThumbarButtons(items); + logger.info('window-store: restoring thumbnail toolbar buttons'); + } + // Store reset this.destroyWindowStore(); }