-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Mobile: Fixes #11264: Fix editor shows nothing when there are no selected note IDs #11514
Mobile: Fixes #11264: Fix editor shows nothing when there are no selected note IDs #11514
Conversation
…e no selectedNoteIds
I'm closing this temporarily — although the note now renders after switching apps and returning, the tag dialog (which uses A better fix may involve preventing |
Possible issue: If:
Then the selected folder ID may still not match the parent ID of the selected note. As a result, I'm converting this pull request to a draft until this is resolved. |
Summary
This pull request fixes #11264 by preventing
reducer.ts
from clearingselectedNoteIds
on mobile. Previously, some actions could result in the note the user was editing being removed from the selection. This caused the note editor to vanish.To preserve the existing behavior on desktop, this pull request adds a property to the app state,
allowSelectionInOtherFolders
. When set totrue
, the reducer should avoid clearingselectedNoteIds
when the selection is moved out of the current folder.Notes
release-3.1
. Due to an incorrectly resolved merge conflict, this fix was not applied todev
. This original fix worked by overriding thenoteId
prop passed to the note editor with the last non-nullnoteId
. With this change, however, parts of the app that rely onstate.selectedNoteIds
to determine the note open in the editor remained broken whenselectedNoteIds
was cleared.selectedNoteIds
may be set to the ID of the last-opened note.Testing
On web:
On Android 13: