Skip to content
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 the issue of not updating recentList on unload #13797

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

newliuyaoyan
Copy link

What it does

Fixed the issue of not updating the recentList file after the window was closed. This issue is caused by the late update of files when the window is closed.

How to test

After each window close, check if the recentList file has been updated

Follow-ups

Review checklist

Reminder for reviewers

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Hey @newliuyaoyan, thank you for your first contribution.

Unfortunately, the code doesn't compile. I would recommend you to do something else:

onWillStop(): OnWillStopAction {
  return {
    action: async () => {
      await this.server.setMostRecentlyUsedWorkspace(this._workspace ? this._workspace.resource.toString() : '');
      return false;
    },
    reason: 'Saving most recently used workspace',
    // Attempt to run this last
    priority: 1000
  }
}

@msujew msujew added the workspace issues related to the workspace label Jun 11, 2024
@newliuyaoyan
Copy link
Author

Thank you for your help. I have now made the modifications as you suggested

@JonasHelming JonasHelming requested a review from msujew June 20, 2024 07:19
@JonasHelming
Copy link
Contributor

@msujew Can you re-review, please?

@msujew
Copy link
Member

msujew commented Jun 26, 2024

@JonasHelming I've started looking into this, but encountered some unexpected behavior (which I'm not sure about how to fix). Given that this in general is a pretty low-prio issue IMO, I'll get to it for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workspace issues related to the workspace
Projects
Status: Waiting on reviewers
Development

Successfully merging this pull request may close these issues.

None yet

3 participants