mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +08:00 
			
		
		
		
	fix removing stale branches from saved search after refresh, fixes #1354
This commit is contained in:
		
							parent
							
								
									82f410f695
								
							
						
					
					
						commit
						4f75b6aaaf
					
				| @ -54,7 +54,7 @@ function closePersistent(id) { | ||||
| } | ||||
| 
 | ||||
| function showMessage(message, delay = 2000) { | ||||
|     console.debug(utils.now(), "message: ", message); | ||||
|     console.debug(utils.now(), "message:", message); | ||||
| 
 | ||||
|     toast({ | ||||
|         title: "Info", | ||||
|  | ||||
| @ -203,6 +203,11 @@ class TreeCache { | ||||
|                 // force to load all the notes at once instead of one by one
 | ||||
|                 await this.getNotes(searchResultNoteIds); | ||||
| 
 | ||||
|                 // reset all the virtual branches from old search results
 | ||||
|                 if (note.noteId in treeCache.notes) { | ||||
|                     treeCache.notes[note.noteId].children = []; | ||||
|                 } | ||||
| 
 | ||||
|                 const branches = resp.branches.filter(b => b.noteId === note.noteId || b.parentNoteId === note.noteId); | ||||
| 
 | ||||
|                 searchResultNoteIds.forEach((resultNoteId, index) => branches.push({ | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam