Skip to content

Commit

Permalink
7738-view-data-not-populated:
Browse files Browse the repository at this point in the history
switching between view containers could cause view not to be populated with data

Signed-off-by: Dan Arad <[email protected]>
  • Loading branch information
danarad05 authored and vince-fugnitto committed Mar 25, 2021
1 parent eb83e0e commit 5f57a3e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -470,15 +470,19 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
part.onDidChangeVisibility(() => widget.suppressUpdateViewVisibility = part.isHidden);

const tryFireOnDidExpandView = () => {
if (!part.collapsed && part.isVisible) {
if (widget.widgets.length === 0) {
if (!part.collapsed && part.isVisible) {
this.onDidExpandViewEmitter.fire(viewId);
}
} else {
toFire.dispose();
}
};
const toFire = new DisposableCollection(
Disposable.create(() => this.onDidExpandViewEmitter.fire(viewId)),
part.onCollapsed(tryFireOnDidExpandView),
part.onDidChangeVisibility(tryFireOnDidExpandView)
);

tryFireOnDidExpandView();
}
}
Expand Down

0 comments on commit 5f57a3e

Please sign in to comment.