1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-02 22:49:09 +02:00

Desktop: Resolves #1490: Add support for anchor hashes in note links

This commit is contained in:
Laurent Cozic
2019-09-09 18:16:00 +01:00
parent fa83107840
commit 7aea2cec69
11 changed files with 103 additions and 12 deletions

View File

@@ -12,6 +12,7 @@ const defaultState = {
notLoadedMasterKeys: [],
searches: [],
selectedNoteIds: [],
selectedNoteHash: '',
selectedFolderId: null,
selectedTagId: null,
selectedSearchId: null,
@@ -267,6 +268,7 @@ function changeSelectedNotes(state, action, options = null) {
if (JSON.stringify(newState.selectedNoteIds) === JSON.stringify(noteIds)) return state;
newState.selectedNoteIds = noteIds;
newState.newNote = null;
newState.selectedNoteHash = action.hash ? action.hash : '';
} else if (action.type === 'NOTE_SELECT_ADD') {
if (!noteIds.length) return state;
newState.selectedNoteIds = ArrayUtils.unique(newState.selectedNoteIds.concat(noteIds));