@@ -1060,12 +1060,8 @@ class SCMTreeCompressionDelegate implements ITreeCompressionDelegate<TreeElement
1060
1060
class SCMTreeFilter implements ITreeFilter < TreeElement > {
1061
1061
1062
1062
filter ( element : TreeElement ) : boolean {
1063
- if ( ResourceTree . isResourceNode ( element ) ) {
1064
- return true ;
1065
- } else if ( isSCMResourceGroup ( element ) ) {
1063
+ if ( isSCMResourceGroup ( element ) ) {
1066
1064
return element . resources . length > 0 || ! element . hideWhenEmpty ;
1067
- } else if ( isSCMViewSeparator ( element ) ) {
1068
- return true ;
1069
1065
} else {
1070
1066
return true ;
1071
1067
}
@@ -3249,30 +3245,18 @@ class SCMTreeDataSource implements IAsyncDataSource<ISCMViewService, TreeElement
3249
3245
3250
3246
// Incoming/Outgoing Separator
3251
3247
if ( historyItemGroups . length > 0 ) {
3252
- const showIncomingChanges = this . showIncomingChanges ( ) ;
3253
- const showOutgoingChanges = this . showOutgoingChanges ( ) ;
3254
- if ( showIncomingChanges !== 'never' && showOutgoingChanges !== 'never' ) {
3255
- children . push ( {
3256
- label : localize ( 'syncSeparatorHeader' , "Incoming/Outgoing" ) ,
3257
- ariaLabel : localize ( 'syncSeparatorHeaderAriaLabel' , "Incoming and outgoing changes" ) ,
3258
- repository : inputOrElement ,
3259
- type : 'separator'
3260
- } as SCMViewSeparatorElement ) ;
3261
- } else if ( showIncomingChanges === 'never' ) {
3262
- children . push ( {
3263
- label : localize ( 'syncOutgoingSeparatorHeader' , "Outgoing" ) ,
3264
- ariaLabel : localize ( 'syncOutgoingSeparatorHeaderAriaLabel' , "Outgoing changes" ) ,
3265
- repository : inputOrElement ,
3266
- type : 'separator'
3267
- } as SCMViewSeparatorElement ) ;
3268
- } else if ( showOutgoingChanges === 'never' ) {
3269
- children . push ( {
3270
- label : localize ( 'syncIncomingSeparatorHeader' , "Incoming" ) ,
3271
- ariaLabel : localize ( 'syncIncomingSeparatorHeaderAriaLabel' , "Incoming changes" ) ,
3272
- repository : inputOrElement ,
3273
- type : 'separator'
3274
- } as SCMViewSeparatorElement ) ;
3248
+ let label = localize ( 'syncSeparatorHeader' , "Incoming/Outgoing" ) ;
3249
+ let ariaLabel = localize ( 'syncSeparatorHeaderAriaLabel' , "Incoming and outgoing changes" ) ;
3250
+
3251
+ if ( this . showIncomingChanges ( ) !== 'never' && this . showOutgoingChanges ( ) === 'never' ) {
3252
+ label = localize ( 'syncIncomingSeparatorHeader' , "Incoming" ) ;
3253
+ ariaLabel = localize ( 'syncIncomingSeparatorHeaderAriaLabel' , "Incoming changes" ) ;
3254
+ } else if ( this . showIncomingChanges ( ) === 'never' && this . showOutgoingChanges ( ) !== 'never' ) {
3255
+ label = localize ( 'syncOutgoingSeparatorHeader' , "Outgoing" ) ;
3256
+ ariaLabel = localize ( 'syncOutgoingSeparatorHeaderAriaLabel' , "Outgoing changes" ) ;
3275
3257
}
3258
+
3259
+ children . push ( { label, ariaLabel, repository : inputOrElement , type : 'separator' } as SCMViewSeparatorElement ) ;
3276
3260
}
3277
3261
3278
3262
children . push ( ...historyItemGroups ) ;
0 commit comments