Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix bug where after trusting, UI didn't update
  • Loading branch information
joyceerhl committed Jul 11, 2020
commit 2d6f903ce17976f393c4262bfad8ac6a6b2696a1
4 changes: 2 additions & 2 deletions src/client/datascience/interactive-ipynb/nativeEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export class NativeEditor extends InteractiveBase implements INotebookEditor {

// Sign up for dirty events
model.changed(this.modelChanged.bind(this));
this.previouslyNotTrusted = model.isTrusted;
this.previouslyNotTrusted = !model.isTrusted;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ensures that monitorChangesToTrust tells the UI to update when the user trusts a previously untrusted notebook

}

// tslint:disable-next-line: no-any
Expand Down Expand Up @@ -602,7 +602,7 @@ export class NativeEditor extends InteractiveBase implements INotebookEditor {
if (this.previouslyNotTrusted && this.model?.isTrusted) {
this.previouslyNotTrusted = false;
// Tell UI to update main state
this.postMessage(InteractiveWindowMessages.TrustNotebookComplete).ignoreErrors();
await this.postMessage(InteractiveWindowMessages.TrustNotebookComplete);
Comment thread
joyceerhl marked this conversation as resolved.
Resolved
}
}
private renameVariableExplorerHeights(name: string, updatedName: string) {
Expand Down