浏览代码

Renames deprecated data key

main
Eric Amodio 4 年前
父节点
当前提交
cfde9bbf90
共有 2 个文件被更改,包括 4 次插入3 次删除
  1. +2
    -1
      src/constants.ts
  2. +2
    -2
      src/views/searchAndCompareView.ts

+ 2
- 1
src/constants.ts 查看文件

@ -216,10 +216,11 @@ export interface StarredRepositories {
export enum WorkspaceState {
BranchComparisons = 'gitlens:branch:comparisons',
DefaultRemote = 'gitlens:remote:default',
DeprecatedPinnedComparisons = 'gitlens:pinned:comparisons',
StarredBranches = 'gitlens:starred:branches',
StarredRepositories = 'gitlens:starred:repositories',
ViewsRepositoriesAutoRefresh = 'gitlens:views:repositories:autoRefresh',
ViewsSearchAndCompareKeepResults = 'gitlens:views:searchAndCompare:keepResults',
ViewsSearchAndComparePinnedItems = 'gitlens:views:searchAndCompare:pinned',
Deprecated_PinnedComparisons = 'gitlens:pinned:comparisons',
}

+ 2
- 2
src/views/searchAndCompareView.ts 查看文件

@ -415,7 +415,7 @@ export class SearchAndCompareView extends ViewBase
if (savedPins == null) {
// Migrate any deprecated pinned items
const deprecatedPins = Container.context.workspaceState.get<DeprecatedPinnedComparisons>(
WorkspaceState.DeprecatedPinnedComparisons,
WorkspaceState.Deprecated_PinnedComparisons,
);
if (deprecatedPins == null) return [];
@ -431,7 +431,7 @@ export class SearchAndCompareView extends ViewBase
}
void Container.context.workspaceState.update(WorkspaceState.ViewsSearchAndComparePinnedItems, savedPins);
void Container.context.workspaceState.update(WorkspaceState.DeprecatedPinnedComparisons, undefined);
void Container.context.workspaceState.update(WorkspaceState.Deprecated_PinnedComparisons, undefined);
}
const root = this.ensureRoot();

正在加载...
取消
保存