Skip to content

Commit e44db8e

Browse files
committed
scm: migrate git->scm viewlet
1 parent b788c6f commit e44db8e

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/vs/workbench/browser/parts/activitybar/activitybarPart.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff 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());

0 commit comments

Comments
 (0)