fixed frontend update after note deletion

This commit is contained in:
zadam 2021-07-26 21:11:51 +02:00
parent 6e7b722bf2
commit 3a78a75afc
5 changed files with 16 additions and 4 deletions

View file

@ -22,6 +22,8 @@ class Attribute {
this.position = row.position;
/** @param {boolean} isInheritable */
this.isInheritable = !!row.isInheritable;
/** @param {boolean} */
this.isDeleted = !!row.isDeleted;
}
/** @returns {NoteShort} */

View file

@ -21,6 +21,8 @@ class Branch {
this.isExpanded = !!row.isExpanded;
/** @param {boolean} */
this.fromSearchNote = !!row.fromSearchNote;
/** @param {boolean} */
this.isDeleted = !!row.isDeleted;
}
/** @returns {NoteShort} */

View file

@ -61,6 +61,8 @@ class NoteShort {
this.type = row.type;
/** @param {string} content-type, e.g. "application/json" */
this.mime = row.mime;
/** @param {boolean} */
this.isDeleted = !!row.isDeleted;
}
addParent(parentNoteId, branchId) {

View file

@ -455,6 +455,11 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
}
const note = await froca.getNote(node.data.noteId);
if (!note || note.isDeleted) {
return;
}
const activeNoteContext = appContext.tabManager.getActiveContext();
const $span = $(node.span);

View file

@ -11,7 +11,8 @@ span.fancytree-node.fancytree-hide {
}
.fancytree-title {
margin-left: 7px !important;
margin-left: 7px;
outline: none;
}
.fancytree-expander {
@ -54,7 +55,7 @@ span.fancytree-node.fancytree-hide {
}
.fancytree-loading span.fancytree-expander {
background-image: none !important;
background-image: none;
display: inline-block;
width: 16px;
height: 16px;
@ -119,8 +120,8 @@ span.fancytree-node.muted { opacity: 0.6; }
}
ul.fancytree-container {
outline: none !important;
background-color: inherit !important;
outline: none;
background-color: inherit;
}
.fancytree-custom-icon {