mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-30 12:13:52 +08:00 
			
		
		
		
	fixed frontend update after note deletion
This commit is contained in:
		
							parent
							
								
									6e7b722bf2
								
							
						
					
					
						commit
						3a78a75afc
					
				| @ -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} */ | ||||
|  | ||||
| @ -21,6 +21,8 @@ class Branch { | ||||
|         this.isExpanded = !!row.isExpanded; | ||||
|         /** @param {boolean} */ | ||||
|         this.fromSearchNote = !!row.fromSearchNote; | ||||
|         /** @param {boolean} */ | ||||
|         this.isDeleted = !!row.isDeleted; | ||||
|     } | ||||
| 
 | ||||
|     /** @returns {NoteShort} */ | ||||
|  | ||||
| @ -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) { | ||||
|  | ||||
| @ -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); | ||||
|  | ||||
| @ -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 { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam