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

Desktop: Fixes #10284: Sort the note list soon after changing a note's title #10512

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented May 28, 2024

Summary

This pull request resolves #10284 by resorting the note list very soon after a note's title is changed from the note editor.

Notes

  • The current note needs to finish saving before the note list can be resorted. To allow this, scheduleSaveNote now returns a Promise that resolves after saving has finished.
    • AsyncActionQueue.waitForAllDone is used for this. Previously, it used setInterval. This pull request should make waitForAllDone more efficient.

Testing plan

  1. Open "All notes" in a profile with a large number of notes.
  2. Select a note.
  3. Switch to alphabetical sorting.
  4. Add a - to the beginning of the note title.
  5. Verify that the notebook list is quickly updated (< 1 second).
  6. Remove the -.
  7. Verify that the note list is quickly updated.

This has been tested successfully on Ubuntu 24.04.

@personalizedrefrigerator
Copy link
Collaborator Author

Closing temporarily — due to a race condition, the note list may not be sorted correctly.

@laurent22 laurent22 merged commit 99b840d into laurent22:dev May 30, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Note list: Slower to update in version 2.14 and 3.0 than 2.13
2 participants