From f35ff9c965c6f024ad17e272c440df53a64c3c1c 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 3eba2cc7baa..1c193396908 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 }) + } } /**