Add onPanelWasDisposed
This commit is contained in:
@@ -108,6 +108,10 @@ export class DataExtensionsEditorView extends AbstractWebview<
|
||||
}
|
||||
});
|
||||
|
||||
panel.onDidDispose(async () => {
|
||||
await this.onPanelWasDisposed();
|
||||
});
|
||||
|
||||
await this.waitForPanelLoaded();
|
||||
}
|
||||
|
||||
@@ -116,6 +120,13 @@ export class DataExtensionsEditorView extends AbstractWebview<
|
||||
DataExtensionsEditorView.mostRecentlyActivePanel = panel;
|
||||
}
|
||||
|
||||
private async onPanelWasDisposed(): Promise<void> {
|
||||
const panel = await this.getPanel();
|
||||
if (panel === DataExtensionsEditorView.mostRecentlyActivePanel) {
|
||||
DataExtensionsEditorView.mostRecentlyActivePanel = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
private async isTheMostRecentlyActivePanel(): Promise<boolean> {
|
||||
const panel = await this.getPanel();
|
||||
return panel === DataExtensionsEditorView.mostRecentlyActivePanel;
|
||||
|
||||
Reference in New Issue
Block a user