Browse Source

Switches to negative to avoid delayed view loading

main
Eric Amodio 4 years ago
parent
commit
11277e4c76
3 changed files with 12 additions and 10 deletions
  1. +10
    -10
      package.json
  2. +1
    -0
      src/constants.ts
  3. +1
    -0
      src/extension.ts

+ 10
- 10
package.json View File

@ -7545,21 +7545,21 @@
{ {
"id": "gitlens.views.repositories", "id": "gitlens.views.repositories",
"name": "Repositories", "name": "Repositories",
"when": "gitlens:enabled && config.gitlens.views.repositories.enabled",
"when": "!gitlens:disabled && config.gitlens.views.repositories.enabled",
"contextualTitle": "GitLens", "contextualTitle": "GitLens",
"icon": "images/views/repositories.svg" "icon": "images/views/repositories.svg"
}, },
{ {
"id": "gitlens.views.commits", "id": "gitlens.views.commits",
"name": "Commits", "name": "Commits",
"when": "gitlens:enabled",
"when": "!gitlens:disabled",
"contextualTitle": "GitLens", "contextualTitle": "GitLens",
"icon": "images/views/commits.svg" "icon": "images/views/commits.svg"
}, },
{ {
"id": "gitlens.views.fileHistory", "id": "gitlens.views.fileHistory",
"name": "File History", "name": "File History",
"when": "gitlens:enabled",
"when": "!gitlens:disabled",
"contextualTitle": "GitLens", "contextualTitle": "GitLens",
"icon": "images/views/history.svg" "icon": "images/views/history.svg"
}, },
@ -7574,14 +7574,14 @@
{ {
"id": "gitlens.views.branches", "id": "gitlens.views.branches",
"name": "Branches", "name": "Branches",
"when": "gitlens:enabled",
"when": "!gitlens:disabled",
"contextualTitle": "GitLens", "contextualTitle": "GitLens",
"icon": "images/views/branches.svg" "icon": "images/views/branches.svg"
}, },
{ {
"id": "gitlens.views.remotes", "id": "gitlens.views.remotes",
"name": "Remotes", "name": "Remotes",
"when": "gitlens:enabled",
"when": "!gitlens:disabled",
"contextualTitle": "GitLens", "contextualTitle": "GitLens",
"icon": "images/views/remotes.svg", "icon": "images/views/remotes.svg",
"visibility": "collapsed" "visibility": "collapsed"
@ -7589,7 +7589,7 @@
{ {
"id": "gitlens.views.stashes", "id": "gitlens.views.stashes",
"name": "Stashes", "name": "Stashes",
"when": "gitlens:enabled",
"when": "!gitlens:disabled",
"contextualTitle": "GitLens", "contextualTitle": "GitLens",
"icon": "images/views/stashes.svg", "icon": "images/views/stashes.svg",
"visibility": "collapsed" "visibility": "collapsed"
@ -7597,7 +7597,7 @@
{ {
"id": "gitlens.views.tags", "id": "gitlens.views.tags",
"name": "Tags", "name": "Tags",
"when": "gitlens:enabled",
"when": "!gitlens:disabled",
"contextualTitle": "GitLens", "contextualTitle": "GitLens",
"icon": "images/views/tags.svg", "icon": "images/views/tags.svg",
"visibility": "collapsed" "visibility": "collapsed"
@ -7605,7 +7605,7 @@
{ {
"id": "gitlens.views.contributors", "id": "gitlens.views.contributors",
"name": "Contributors", "name": "Contributors",
"when": "gitlens:enabled",
"when": "!gitlens:disabled",
"contextualTitle": "GitLens", "contextualTitle": "GitLens",
"icon": "images/views/contributors.svg", "icon": "images/views/contributors.svg",
"visibility": "collapsed" "visibility": "collapsed"
@ -7613,7 +7613,7 @@
{ {
"id": "gitlens.views.search", "id": "gitlens.views.search",
"name": "Search Commits", "name": "Search Commits",
"when": "gitlens:enabled",
"when": "!gitlens:disabled",
"contextualTitle": "GitLens", "contextualTitle": "GitLens",
"icon": "images/views/search.svg", "icon": "images/views/search.svg",
"visibility": "collapsed" "visibility": "collapsed"
@ -7621,7 +7621,7 @@
{ {
"id": "gitlens.views.compare", "id": "gitlens.views.compare",
"name": "Compare Commits", "name": "Compare Commits",
"when": "gitlens:enabled",
"when": "!gitlens:disabled",
"contextualTitle": "GitLens", "contextualTitle": "GitLens",
"icon": "images/views/compare.svg", "icon": "images/views/compare.svg",
"visibility": "collapsed" "visibility": "collapsed"

+ 1
- 0
src/constants.ts View File

@ -34,6 +34,7 @@ export enum CommandContext {
ActiveFileStatus = 'gitlens:activeFileStatus', ActiveFileStatus = 'gitlens:activeFileStatus',
AnnotationStatus = 'gitlens:annotationStatus', AnnotationStatus = 'gitlens:annotationStatus',
CanToggleCodeLens = 'gitlens:canToggleCodeLens', CanToggleCodeLens = 'gitlens:canToggleCodeLens',
Disabled = 'gitlens:disabled',
Enabled = 'gitlens:enabled', Enabled = 'gitlens:enabled',
HasRemotes = 'gitlens:hasRemotes', HasRemotes = 'gitlens:hasRemotes',
Key = 'gitlens:key', Key = 'gitlens:key',

+ 1
- 0
src/extension.ts View File

@ -44,6 +44,7 @@ export async function activate(context: ExtensionContext) {
if (!enabled) { if (!enabled) {
Logger.log(`GitLens (v${gitlensVersion}) was NOT activated -- "git.enabled": false`); Logger.log(`GitLens (v${gitlensVersion}) was NOT activated -- "git.enabled": false`);
void setCommandContext(CommandContext.Enabled, false); void setCommandContext(CommandContext.Enabled, false);
void setCommandContext(CommandContext.Disabled, true);
void Messages.showGitDisabledErrorMessage(); void Messages.showGitDisabledErrorMessage();

Loading…
Cancel
Save