mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-07-09 17:28:58 +00:00
fix(vscode): retain sidebar webview context when hidden (#227)
Set retainContextWhenHidden on the sidebar WebviewView registration so review state survives switching to other sidebar panels (Fixes #224).
This commit is contained in:
parent
c8ff673667
commit
02a6423894
1 changed files with 5 additions and 1 deletions
|
|
@ -22,7 +22,11 @@ export function activate(context: vscode.ExtensionContext): void {
|
|||
const configPanel = new ConfigPanelProvider(extensionUri, cli, config, (cfg) => sidebar.pushConfig(cfg));
|
||||
sidebar.bindConfigPanel((focus) => configPanel.open(focus));
|
||||
|
||||
const viewReg = vscode.window.registerWebviewViewProvider(SIDEBAR_VIEW_ID, sidebar);
|
||||
const viewReg = vscode.window.registerWebviewViewProvider(
|
||||
SIDEBAR_VIEW_ID,
|
||||
sidebar,
|
||||
{ webviewOptions: { retainContextWhenHidden: true } },
|
||||
);
|
||||
const cmdReg = registerCommands(comments, () => configPanel.open());
|
||||
|
||||
disposables.push(viewReg, cmdReg, comments, output, configPanel);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue