diff --git a/package.json b/package.json index f79ba2a..080187e 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,6 @@ "activationEvents": [ "onCustomEditor:gitlens.rebase", "onFileSystem:gitlens", - "onView:gitlens.views.updates", "onView:gitlens.views.repositories", "onView:gitlens.views.commits", "onView:gitlens.views.fileHistory", @@ -84,7 +83,6 @@ "onCommand:gitlens.showStashesView", "onCommand:gitlens.showTagsView", "onCommand:gitlens.showWelcomeView", - "onCommand:gitlens.closeUpdatesView", "onCommand:gitlens.closeWelcomeView", "onCommand:gitlens.compareWith", "onCommand:gitlens.compareHeadWith", @@ -3141,12 +3139,6 @@ "category": "GitLens" }, { - "command": "gitlens.closeUpdatesView", - "title": "Close", - "category": "GitLens", - "icon": "$(close)" - }, - { "command": "gitlens.closeWelcomeView", "title": "Close", "category": "GitLens", @@ -5234,10 +5226,6 @@ "when": "gitlens:enabled" }, { - "command": "gitlens.closeUpdatesView", - "when": "false" - }, - { "command": "gitlens.closeWelcomeView", "when": "false" }, @@ -6934,11 +6922,6 @@ ], "view/title": [ { - "command": "gitlens.closeUpdatesView", - "when": "view == gitlens.views.updates", - "group": "navigation@1" - }, - { "command": "gitlens.closeWelcomeView", "when": "view == gitlens.views.welcome", "group": "navigation@1" @@ -9541,26 +9524,6 @@ "contents": "[Close](command:gitlens.closeWelcomeView \"Closes the Welcome view\")" }, { - "view": "gitlens.views.updates", - "contents": "[GitLens views](command:gitlens.showSettingsPage%23views) have moved to the Source Control side bar.\nRun [GitLens: Set Views Layout](command:gitlens.setViewsLayout \"Changes the GitLens Views Layout\") from the Command Palette to switch to an alternate side bar layout, or drag & drop them." - }, - { - "view": "gitlens.views.updates", - "contents": "★ [Repositories](command:gitlens.showSettingsPage%23repositories-view) — replaced by [Commits](command:gitlens.showSettingsPage%23commits-view), [Branches](command:gitlens.showSettingsPage%23branches-view), [Remotes](command:gitlens.showSettingsPage%23remotes-view), [Stashes](command:gitlens.showSettingsPage%23stashes-view), [Tags](command:gitlens.showSettingsPage%23tags-view), and [Contributors](command:gitlens.showSettingsPage%23contributors-view) views. If you want it back, [click here](command:gitlens.showRepositoriesView)." - }, - { - "view": "gitlens.views.updates", - "contents": "★ [File History](command:gitlens.showSettingsPage%23file-history-view) — combines file and line history into a single view" - }, - { - "view": "gitlens.views.updates", - "contents": "★ [Search & Compare](command:gitlens.showSettingsPage%23search-compare-view) — combines Search Commits and Compare Commits into a single view" - }, - { - "view": "gitlens.views.updates", - "contents": "[Close](command:gitlens.closeUpdatesView)" - }, - { "view": "gitlens.views.searchAndCompare", "contents": "Search for commits by [message](command:gitlens.views.searchAndCompare.searchCommits?%7B%22search%22%3A%7B%22pattern%22%3A%22message%3A%22%7D%2C%22prefillOnly%22%3Atrue%7D), [author](command:gitlens.views.searchAndCompare.searchCommits?%7B%22search%22%3A%7B%22pattern%22%3A%22author%3A%22%7D%2C%22prefillOnly%22%3Atrue%7D), [SHA](command:gitlens.views.searchAndCompare.searchCommits?%7B%22search%22%3A%7B%22pattern%22%3A%22commit%3A%22%7D%2C%22prefillOnly%22%3Atrue%7D), [file](command:gitlens.views.searchAndCompare.searchCommits?%7B%22search%22%3A%7B%22pattern%22%3A%22file%3A%22%7D%2C%22prefillOnly%22%3Atrue%7D), or [changes](command:gitlens.views.searchAndCompare.searchCommits?%7B%22search%22%3A%7B%22pattern%22%3A%22change%3A%22%7D%2C%22prefillOnly%22%3Atrue%7D)\n\n[Search Commits...](command:gitlens.views.searchAndCompare.searchCommits)" }, @@ -9572,14 +9535,6 @@ "views": { "gitlens": [ { - "id": "gitlens.views.updates", - "name": "Where did my views go?", - "when": "gitlens:views:updates:visible != false", - "contextualTitle": "GitLens", - "icon": "images/gitlens-activitybar.svg", - "visibility": "visible" - }, - { "id": "gitlens.views.welcome", "name": "Welcome", "when": "gitlens:views:welcome:visible != false", diff --git a/src/commands/closeView.ts b/src/commands/closeView.ts index 443590c..25d3dec 100644 --- a/src/commands/closeView.ts +++ b/src/commands/closeView.ts @@ -6,7 +6,7 @@ import { command, Command, CommandContext, Commands } from './common'; @command() export class CloseViewCommand extends Command { constructor() { - super([Commands.CloseWelcomeView, Commands.CloseUpdatesView]); + super([Commands.CloseWelcomeView]); } protected override preExecute(context: CommandContext) { @@ -19,10 +19,6 @@ export class CloseViewCommand extends Command { await Container.context.globalState.update(SyncedState.WelcomeViewVisible, false); await setContext(ContextKeys.ViewsWelcomeVisible, false); break; - case Commands.CloseUpdatesView: - await Container.context.globalState.update(SyncedState.UpdatesViewVisible, false); - await setContext(ContextKeys.ViewsUpdatesVisible, false); - break; } } } diff --git a/src/commands/common.ts b/src/commands/common.ts index 7e4bbf8..319213b 100644 --- a/src/commands/common.ts +++ b/src/commands/common.ts @@ -34,7 +34,6 @@ export enum Commands { BrowseRepoBeforeRevisionInNewWindow = 'gitlens.browseRepoBeforeRevisionInNewWindow', ClearFileAnnotations = 'gitlens.clearFileAnnotations', CloseUnchangedFiles = 'gitlens.closeUnchangedFiles', - CloseUpdatesView = 'gitlens.closeUpdatesView', CloseWelcomeView = 'gitlens.closeWelcomeView', CompareWith = 'gitlens.compareWith', CompareHeadWith = 'gitlens.compareHeadWith', diff --git a/src/constants.ts b/src/constants.ts index 468bf2e..103c578 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -63,7 +63,6 @@ export enum ContextKeys { ViewsLineHistoryEditorFollowing = 'gitlens:views:lineHistory:editorFollowing', ViewsRepositoriesAutoRefresh = 'gitlens:views:repositories:autoRefresh', ViewsSearchAndCompareKeepResults = 'gitlens:views:searchAndCompare:keepResults', - ViewsUpdatesVisible = 'gitlens:views:updates:visible', ViewsWelcomeVisible = 'gitlens:views:welcome:visible', Vsls = 'gitlens:vsls', } @@ -167,7 +166,6 @@ export const enum GlyphChars { } export enum SyncedState { - UpdatesViewVisible = 'gitlens:views:updates:visible', Version = 'gitlens:synced:version', WelcomeViewVisible = 'gitlens:views:welcome:visible', diff --git a/src/extension.ts b/src/extension.ts index 537cff0..8ddaa18 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -87,31 +87,18 @@ export async function activate(context: ExtensionContext): Promise(SyncedState.WelcomeViewVisible)}, ${ - SyncedState.UpdatesViewVisible - }=${context.globalState.get(SyncedState.UpdatesViewVisible)}`, + }=${context.globalState.get(SyncedState.WelcomeViewVisible)}`, ); } if (previousVersion == null) { void context.globalState.update(SyncedState.WelcomeViewVisible, true); void setContext(ContextKeys.ViewsWelcomeVisible, true); - void context.globalState.update(SyncedState.UpdatesViewVisible, false); - void setContext(ContextKeys.ViewsUpdatesVisible, false); } else { - // Force Updates welcome view, since for some reason it never showed for many users - if (Versions.compare(previousVersion, Versions.from(11, 0, 5)) !== 1) { - await context.globalState.update(SyncedState.UpdatesViewVisible, true); - } - void setContext( ContextKeys.ViewsWelcomeVisible, context.globalState.get(SyncedState.WelcomeViewVisible) ?? false, ); - void setContext( - ContextKeys.ViewsUpdatesVisible, - context.globalState.get(SyncedState.UpdatesViewVisible) !== false, - ); } const enabled = workspace.getConfiguration('git', null).get('enabled', true); @@ -210,12 +197,7 @@ export async function setEnabled(enabled: boolean): Promise { } export function setKeysForSync(...keys: (SyncedState | string)[]) { - return _context?.globalState.setKeysForSync([ - ...keys, - SyncedState.UpdatesViewVisible, - SyncedState.Version, - SyncedState.WelcomeViewVisible, - ]); + return _context?.globalState.setKeysForSync([...keys, SyncedState.Version, SyncedState.WelcomeViewVisible]); } export function notifyOnUnsupportedGitVersion(version: string) {