mirror of
https://github.com/desktop/desktop
synced 2024-09-18 07:32:01 +00:00
Make all the check marks toggle on setting update
This commit is contained in:
parent
b57a4c44fc
commit
5c44f39312
|
@ -234,7 +234,10 @@ export class SideBySideDiffRow extends React.Component<
|
|||
isDiffSelectable,
|
||||
} = this.props
|
||||
const baseRowClasses = classNames('row', {
|
||||
'has-check-all-control': enableGroupDiffCheckmarks() && isDiffSelectable,
|
||||
'has-check-all-control':
|
||||
enableGroupDiffCheckmarks() &&
|
||||
this.props.showDiffCheckMarks &&
|
||||
isDiffSelectable,
|
||||
})
|
||||
const beforeClasses = classNames('before', ...beforeClassNames)
|
||||
const afterClasses = classNames('after', ...afterClassNames)
|
||||
|
@ -599,7 +602,7 @@ export class SideBySideDiffRow extends React.Component<
|
|||
style={style}
|
||||
>
|
||||
<span className="focus-handle">
|
||||
{!enableGroupDiffCheckmarks() && (
|
||||
{!enableGroupDiffCheckmarks() && !this.props.showDiffCheckMarks && (
|
||||
<div className="increased-hover-surface" style={{ height }} />
|
||||
)}
|
||||
{!onlyOneLine && this.getCheckAllOcticon(selectionState)}
|
||||
|
@ -647,7 +650,7 @@ export class SideBySideDiffRow extends React.Component<
|
|||
}
|
||||
|
||||
private getCheckAllOcticon = (selectionState: DiffSelectionType) => {
|
||||
if (!enableGroupDiffCheckmarks()) {
|
||||
if (!enableGroupDiffCheckmarks() || !this.props.showDiffCheckMarks) {
|
||||
return null
|
||||
}
|
||||
|
||||
|
|
|
@ -580,6 +580,7 @@ export class SideBySideDiff extends React.Component<
|
|||
afterTokens={this.state.afterTokens}
|
||||
temporarySelection={this.state.temporarySelection}
|
||||
hoveredHunk={this.state.hoveredHunk}
|
||||
showDiffCheckMarks={this.props.showDiffCheckMarks}
|
||||
isSelectable={canSelect(this.props.file)}
|
||||
fileSelection={this.getSelection()}
|
||||
// rows are memoized and include things like the
|
||||
|
|
Loading…
Reference in a new issue