提交 e44db8ed 编写于 作者: J Joao Moreno

scm: migrate git->scm viewlet

上级 b788c6f6
......@@ -71,7 +71,18 @@ export class ActivitybarPart extends Part implements IActivityBarService {
this.viewletIdToActivity = Object.create(null);
this.memento = this.getMemento(this.storageService, MementoScope.GLOBAL);
this.pinnedViewlets = this.memento[ActivitybarPart.PINNED_VIEWLETS] || this.viewletService.getViewlets().map(v => v.id);
const pinnedViewlets = this.memento[ActivitybarPart.PINNED_VIEWLETS] as string[];
if (pinnedViewlets) {
// Migrate git => scm viewlet
this.pinnedViewlets = pinnedViewlets
.map(id => id === 'workbench.view.git' ? 'workbench.view.scm' : id)
.filter(arrays.uniqueFilter<string>(str => str));
} else {
this.pinnedViewlets = this.viewletService.getViewlets().map(v => v.id);
}
// Update viewlet switcher when external viewlets become ready
this.extensionService.onReady().then(() => this.updateViewletSwitcher());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册