deleting a note will close all tabs containing the note

This commit is contained in:
zadam
2019-05-20 21:50:01 +02:00
parent aead6a44de
commit 48b4488a58
5 changed files with 27 additions and 6 deletions

View File

@@ -373,9 +373,10 @@ async function updateNote(noteId, noteUpdates) {
await protectNoteRevisions(note);
}
/** @return {boolean} - true if note has been deleted, false otherwise */
async function deleteNote(branch) {
if (!branch || branch.isDeleted) {
return;
return false;
}
if (branch.branchId === 'root'
@@ -418,6 +419,11 @@ async function deleteNote(branch) {
link.isDeleted = true;
await link.save();
}
return true;
}
else {
return false;
}
}