Skip to content

Commit

Permalink
fix: #200046 (#200485)
Browse files Browse the repository at this point in the history
  • Loading branch information
susiwen8 authored Dec 15, 2023
1 parent baab9bd commit 74bf30a
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions src/vs/workbench/contrib/scm/browser/scmViewPane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3249,12 +3249,30 @@ class SCMTreeDataSource implements IAsyncDataSource<ISCMViewService, TreeElement

// Incoming/Outgoing Separator
if (historyItemGroups.length > 0) {
children.push({
label: localize('syncSeparatorHeader', "Incoming/Outgoing"),
ariaLabel: localize('syncSeparatorHeaderAriaLabel', "Incoming and outgoing changes"),
repository: inputOrElement,
type: 'separator'
} as SCMViewSeparatorElement);
const showIncomingChanges = this.showIncomingChanges();
const showOutgoingChanges = this.showOutgoingChanges();
if (showIncomingChanges !== 'never' && showOutgoingChanges !== 'never') {
children.push({
label: localize('syncSeparatorHeader', "Incoming/Outgoing"),
ariaLabel: localize('syncSeparatorHeaderAriaLabel', "Incoming and outgoing changes"),
repository: inputOrElement,
type: 'separator'
} as SCMViewSeparatorElement);
} else if (showIncomingChanges === 'never') {
children.push({
label: localize('syncOutgoingSeparatorHeader', "Outgoing"),
ariaLabel: localize('syncOutgoingSeparatorHeaderAriaLabel', "Outgoing changes"),
repository: inputOrElement,
type: 'separator'
} as SCMViewSeparatorElement);
} else if (showOutgoingChanges === 'never') {
children.push({
label: localize('syncIncomingSeparatorHeader', "Incoming"),
ariaLabel: localize('syncIncomingSeparatorHeaderAriaLabel', "Incoming changes"),
repository: inputOrElement,
type: 'separator'
} as SCMViewSeparatorElement);
}
}

children.push(...historyItemGroups);
Expand Down

0 comments on commit 74bf30a

Please sign in to comment.