File tree Expand file tree Collapse file tree
src/vs/workbench/browser/parts/activitybar Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,7 +71,18 @@ export class ActivitybarPart extends Part implements IActivityBarService {
7171 this . viewletIdToActivity = Object . create ( null ) ;
7272
7373 this . memento = this . getMemento ( this . storageService , MementoScope . GLOBAL ) ;
74- this . pinnedViewlets = this . memento [ ActivitybarPart . PINNED_VIEWLETS ] || this . viewletService . getViewlets ( ) . map ( v => v . id ) ;
74+
75+ const pinnedViewlets = this . memento [ ActivitybarPart . PINNED_VIEWLETS ] as string [ ] ;
76+
77+ if ( pinnedViewlets ) {
78+ // Migrate git => scm viewlet
79+ this . pinnedViewlets = pinnedViewlets
80+ . map ( id => id === 'workbench.view.git' ? 'workbench.view.scm' : id )
81+ . filter ( arrays . uniqueFilter < string > ( str => str ) ) ;
82+
83+ } else {
84+ this . pinnedViewlets = this . viewletService . getViewlets ( ) . map ( v => v . id ) ;
85+ }
7586
7687 // Update viewlet switcher when external viewlets become ready
7788 this . extensionService . onReady ( ) . then ( ( ) => this . updateViewletSwitcher ( ) ) ;
You can’t perform that action at this time.
0 commit comments