Make all the check marks toggle on setting update

This commit is contained in:
tidy-dev 2024-02-27 13:47:55 -05:00
parent b57a4c44fc
commit 5c44f39312
2 changed files with 7 additions and 3 deletions

View file

@ -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
}

View file

@ -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