Save the show diff marks setting to app/local store

This commit is contained in:
tidy-dev 2024-02-27 13:47:13 -05:00
parent 6faeb10548
commit b57a4c44fc
3 changed files with 16 additions and 0 deletions

View file

@ -7951,6 +7951,14 @@ export class AppStore extends TypedBaseStore<IAppState> {
this.emitUpdate()
}
}
public _updateShowDiffCheckMarks(showDiffCheckMarks: boolean) {
if (showDiffCheckMarks !== this.showDiffCheckMarks) {
this.showDiffCheckMarks = showDiffCheckMarks
setBoolean(showDiffCheckMarksKey, showDiffCheckMarks)
this.emitUpdate()
}
}
}
/**

View file

@ -3917,4 +3917,8 @@ export class Dispatcher {
public setUnderlineLinksSetting(underlineLinks: boolean) {
return this.appStore._updateUnderlineLinks(underlineLinks)
}
public setDiffCheckMarksSetting(diffCheckMarks: boolean) {
return this.appStore._updateShowDiffCheckMarks(diffCheckMarks)
}
}

View file

@ -682,6 +682,10 @@ export class Preferences extends React.Component<
this.props.dispatcher.setUnderlineLinksSetting(this.state.underlineLinks)
this.props.dispatcher.setDiffCheckMarksSetting(
this.state.showDiffCheckMarks
)
this.props.onDismissed()
}