fix refreshing notes after import / delete

(cherry picked from commit 5b5ab0b044a243b452ee06a78bf33db13281d9d7)
This commit is contained in:
zadam 2019-11-03 18:33:43 +01:00
parent f7c59700a5
commit fcb6a06d68
3 changed files with 3 additions and 3 deletions

View File

@ -221,7 +221,7 @@ class Attributes {
.prop("title", "Remove this attribute")
.click(async () => {
if (valueAttr.attributeId) {
await server.remove("notes/" + noteId + "/attributes/" + valueAttr.attributeId);
await server.remove("notes/" + this.ctx.note.noteId + "/attributes/" + valueAttr.attributeId);
}
$tr.remove();

View File

@ -148,7 +148,7 @@ async function deleteNodes(nodes) {
const nextNotePath = await getNextNode(nodes);
const noteIds = Array.from(new Set(nodes.map(node => node.data.noteId)));
const noteIds = Array.from(new Set(nodes.map(node => node.getParent().data.noteId)));
await treeService.reloadNotes(noteIds, nextNotePath);

View File

@ -63,7 +63,7 @@ ws.subscribeToMessages(async message => {
toastService.showPersistent(toast);
await treeService.reloadNotes([message.parentNoteId]);
await treeService.reloadNotes([message.result.parentNoteId]);
if (message.result.importedNoteId) {
const node = await treeService.activateNote(message.result.importedNoteId);