mirror of
https://github.com/desktop/desktop
synced 2024-09-13 21:31:32 +00:00
Save the show diff marks setting to app/local store
This commit is contained in:
parent
6faeb10548
commit
b57a4c44fc
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue