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 Mar 31, 2024
1 parent 28e6ff7 commit f35ff9c
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 @@ -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 })
}
}

/**
Expand Down

0 comments on commit f35ff9c

Please sign in to comment.