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 committed Dec 20, 2023
1 parent 3a36e05 commit d7c23ef
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 d7c23ef

Please sign in to comment.