Skip to content

Commit

Permalink
bugfix: only set the popup for restarting when the title bar style ha…
Browse files Browse the repository at this point in the history
…s actually changed (#980)
  • Loading branch information
shiftkey authored Dec 18, 2023
1 parent 44b6018 commit 5b3f7b8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/src/ui/dispatcher/dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2472,8 +2472,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 })
}
}

/**
Expand Down

0 comments on commit 5b3f7b8

Please sign in to comment.