Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCM - always show incoming/outgoing separator #198980

Merged
merged 1 commit into from
Nov 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/vs/workbench/contrib/scm/browser/scmViewPane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ class SCMTreeFilter implements ITreeFilter<TreeElement> {
} else if (isSCMResourceGroup(element)) {
return element.resources.length > 0 || !element.hideWhenEmpty;
} else if (isSCMViewSeparator(element)) {
return element.repository.provider.groups.some(g => g.resources.length > 0);
return true;
} else {
return true;
}
Expand Down Expand Up @@ -3232,7 +3232,6 @@ class SCMTreeDataSource implements IAsyncDataSource<ISCMViewService, TreeElement
}

// ResourceGroups
const showWheEmpty = resourceGroups.some(group => !group.hideWhenEmpty);
const hasSomeChanges = resourceGroups.some(group => group.resources.length > 0);
if (hasSomeChanges || (repositoryCount === 1 && (!showActionButton || !actionButton))) {
children.push(...resourceGroups);
Expand All @@ -3242,7 +3241,7 @@ class SCMTreeDataSource implements IAsyncDataSource<ISCMViewService, TreeElement
const historyItemGroups = await this.getHistoryItemGroups(inputOrElement);

// Incoming/Outgoing Separator
if (historyItemGroups.length > 0 && (hasSomeChanges || showWheEmpty)) {
if (historyItemGroups.length > 0) {
children.push({
label: localize('syncSeparatorHeader', "Incoming/Outgoing"),
repository: inputOrElement,
Expand Down