Skip to content

Commit

Permalink
Fix bugs in view refactor branch
Browse files Browse the repository at this point in the history
  • Loading branch information
taldekar committed Feb 12, 2025
1 parent 99d0560 commit 5266e01
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ public void completed(final ProgressEvent event) {
});
}
});


if (!content.isPresent()) {
content = webViewAssetProvider.getContent();
}
browser.setText(content.get());
} else {
updateBrowser(browser);
}
Expand Down Expand Up @@ -113,11 +117,6 @@ public void completed(final ProgressEvent event) {
}
});

if (!content.isPresent()) {
content = webViewAssetProvider.getContent();
}
browser.setText(content.get());

return parent;
}

Expand All @@ -143,6 +142,10 @@ public final void onSendToChatUi(final String message) {
browser.evaluate(script);
});
}

void disposeBrowserState() {
canDisposeState = true;
}

@Override
public final void dispose() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ private void updateChildView() {
BaseAmazonQView newView = views.get(activeViewType);

if (currentView != null) {
if (currentView.getClass() == AmazonQChatWebview.class) {
((AmazonQChatWebview) currentView).disposeBrowserState();
}
Control[] children = parentComposite.getChildren();
for (Control child : children) {
if (child != null && !child.isDisposed()) {
Expand Down

0 comments on commit 5266e01

Please sign in to comment.