From 458def6f2969a56fa4a82f65964c38ba5feeabcd Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sun, 26 Mar 2023 12:27:10 -0400 Subject: [PATCH] Adds missing registration on graph location change --- package.json | 2 +- src/container.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 580ed7b..305bd4f 100644 --- a/package.json +++ b/package.json @@ -13109,7 +13109,7 @@ "when": "!gitlens:disabled && gitlens:plus:enabled && config.gitlens.graph.experimental.location == view", "contextualTitle": "GitLens", "icon": "$(gitlens-graph)", - "visibility": "hidden" + "visibility": "collapsed" }, { "id": "gitlens.views.contributors", diff --git a/src/container.ts b/src/container.ts index 2eb0d19..1b11814 100644 --- a/src/container.ts +++ b/src/container.ts @@ -306,6 +306,15 @@ export class Container { if (configuration.changed(e, 'mode')) { this.ensureModeApplied(); } + + if (configuration.changed(e, 'graph.experimental.location')) { + if (configuration.get('graph.experimental.location') === 'view') { + this._graphView = registerGraphWebviewView(this._webviews); + } else { + this._graphView?.dispose(); + this._graphView = undefined; + } + } } private readonly _actionRunners: ActionRunners;