-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 'Close Workspace' #3386
Fix 'Close Workspace' #3386
Conversation
Fixes #2662 - Fixed issue with the command `Close Workspace` which did not work on all browsers - Since the function `setMostRecentlyUsedWorkspace` returns a Promise, it was necessary to `await` until the data is saved in `recentWorkspace.json` before reloading Theia Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
72cc8d0
to
3cdabbc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but a committer should approve.
this._workspace = undefined; | ||
this._roots.length = 0; | ||
|
||
this.server.setMostRecentlyUsedWorkspace(''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could talk on Monday in person. Like Simon, I don't really understand the difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to make sure to await
the call this.server.setMostRecentlyUsedWorkspace('')
in order for the backend to properly finish updating before Theia can reload. What I noticed in Firefox for example is that the update never resolves so when Theia reloads it reloads with the workspace that was opened before the Close Workspace
was called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine in Chrome and Firefox
Fixes #2662
Close Workspace
which did not work on all browserssetMostRecentlyUsedWorkspace
returns a Promise, it was necessary toawait
until the data is saved inrecentWorkspace.json
before reloading TheiaSigned-off-by: Vincent Fugnitto vincent.fugnitto@ericsson.com