various small fixes

This commit is contained in:
zadam
2019-09-08 11:25:57 +02:00
parent 90afb2a1ee
commit f3955bcbdc
8 changed files with 17 additions and 16 deletions

View File

@@ -28,19 +28,20 @@ class EditedNotesWidget extends StandardWidget {
const noteIds = editedNotes.flatMap(note => note.notePath);
await treeCache.getNotes(noteIds); // preload all at once
await treeCache.getNotes(noteIds, true); // preload all at once
const $list = $('<ul>');
for (const editedNote of editedNotes) {
const note = await treeCache.getNote(editedNote.noteId);
const note = await treeCache.getNote(editedNote.noteId, true);
const $item = $("<li>");
if (!note) {
continue;
$item.append($("<i>").text(editedNote.title + " (deleted)"));
}
else {
$item.append(editedNote.notePath ? await linkService.createNoteLinkWithPath(editedNote.notePath.join("/")) : editedNote.title);
}
const $item = $("<li>")
.append(editedNote.notePath ? await linkService.createNoteLinkWithPath(editedNote.notePath.join("/")) : editedNote.title);
$list.append($item);
}