-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Click a note link will now select the right folder note and not /home #2941
Conversation
…that will be selected
browser/main/NoteList/index.js
Outdated
this.focusNote(selectedNoteKeys, noteHash, '/home') | ||
|
||
let locationToSelect = '/home' | ||
const notesByHash = data.noteMap.map((note) => note).filter((note) => note.key === noteHash) |
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.
Why don't you use find
instead of filter
? Can you explain it to me?
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.
@ZeroX-DG Thanks for your Feedback. I was inspired by the handleNoteClick
function in NoteList/index.js
. I've changed the code and using the find
function to get the first note and not all notes that matching the key (which always will be one).
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'm sorry but I just can't hold it. Sometimes, I think I have OCD 😄
Co-Authored-By: dredav <dredav@users.noreply.github.com>
@ZeroX-DG Thanks for you suggestion. I have applied it. |
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 🎉 Thank you for your contribution
Description
After following a link to an other note the folder /home (All Notes) will be selected. The expected behavior is that the storage folder of the requested note will be selected.
Screenshot before
Screenshot after
Type of changes
Checklist: