Merge pull request #1824 from NguyenTranHoangSym/SDA-4144_main

SDA-4144: The presence status is still shown when reloading SDA
This commit is contained in:
NguyenTranHoangSym 2023-04-03 16:57:23 +07:00 committed by GitHub
commit 9e7cd6b744
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,6 +53,7 @@ import { notification } from '../renderer/notification';
import { autoLaunchInstance } from './auto-launch-controller'; import { autoLaunchInstance } from './auto-launch-controller';
import { autoUpdate, AutoUpdateTrigger } from './auto-update-handler'; import { autoUpdate, AutoUpdateTrigger } from './auto-update-handler';
import { mainEvents } from './main-event-handler'; import { mainEvents } from './main-event-handler';
import { presenceStatus } from './presence-status-handler';
import { presenceStatusStore } from './stores'; import { presenceStatusStore } from './stores';
interface IStyles { interface IStyles {
@ -815,6 +816,7 @@ export const reloadWindow = (browserWindow: ICustomBrowserWindow) => {
const windowName = browserWindow.winName; const windowName = browserWindow.winName;
const mainWebContents = windowHandler.getMainWebContents(); const mainWebContents = windowHandler.getMainWebContents();
const main = windowHandler.getMainWindow();
// reload the main window // reload the main window
if ( if (
windowName === apiName.mainWindowName && windowName === apiName.mainWindowName &&
@ -825,6 +827,8 @@ export const reloadWindow = (browserWindow: ICustomBrowserWindow) => {
mainWebContents.reload(); mainWebContents.reload();
windowHandler.closeAllWindows(); windowHandler.closeAllWindows();
main?.setThumbarButtons([]);
presenceStatus.onSignOut();
windowHandler.closeScreenSharingIndicator(); windowHandler.closeScreenSharingIndicator();