mirror of
https://github.com/zadam/trilium.git
synced 2025-02-24 15:05:31 +08:00
fix note cache record for newly created/updated protected notes
This commit is contained in:
parent
3ad7db39dd
commit
9cfa2ab1ba
1 changed files with 10 additions and 3 deletions
|
@ -6,8 +6,8 @@ const protectedSessionService = require('./protected_session');
|
|||
const utils = require('./utils');
|
||||
|
||||
let loaded = false;
|
||||
let noteTitles;
|
||||
let protectedNoteTitles;
|
||||
let noteTitles = {};
|
||||
let protectedNoteTitles = {};
|
||||
let noteIds;
|
||||
let childParentToBranchId = {};
|
||||
const childToParent = {};
|
||||
|
@ -247,7 +247,14 @@ eventService.subscribe(eventService.ENTITY_CHANGED, async ({entityName, entity})
|
|||
delete childToParent[note.noteId];
|
||||
}
|
||||
else {
|
||||
noteTitles[note.noteId] = note.title;
|
||||
if (note.isProtected) {
|
||||
if (protectedSessionService.isProtectedSessionAvailable()) {
|
||||
protectedNoteTitles[note.noteId] = protectedSessionService.decryptNoteTitle(note.noteId, note.title);
|
||||
}
|
||||
}
|
||||
else {
|
||||
noteTitles[note.noteId] = note.title;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (entityName === 'branches') {
|
||||
|
|
Loading…
Reference in a new issue