From 325845a92fd97712857c3aee39f2afb4368db860 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Mon, 18 Dec 2023 16:07:16 -0400 Subject: [PATCH] bugfix: only set the popup for restarting when the title bar style has actually changed (#980) --- app/src/ui/dispatcher/dispatcher.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/ui/dispatcher/dispatcher.ts b/app/src/ui/dispatcher/dispatcher.ts index a1cf89290d5..4197e75aa8a 100644 --- a/app/src/ui/dispatcher/dispatcher.ts +++ b/app/src/ui/dispatcher/dispatcher.ts @@ -2454,8 +2454,14 @@ export class Dispatcher { * Set the title bar style for the application */ public async setTitleBarStyle(titleBarStyle: TitleBarStyle) { + const existingState = this.appStore.getState() + const { titleBarStyle: existingTitleBarStyle } = existingState + await this.appStore._setTitleBarStyle(titleBarStyle) - this.showPopup({ type: PopupType.ConfirmRestart }) + + if (titleBarStyle !== existingTitleBarStyle) { + this.showPopup({ type: PopupType.ConfirmRestart }) + } } /**