mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +08:00 
			
		
		
		
	initial load of tabs can run partially asynchronously to speed things up
This commit is contained in:
		
							parent
							
								
									e36d636f93
								
							
						
					
					
						commit
						aa96b33bc2
					
				| @ -276,11 +276,18 @@ async function loadNoteDetail(origNotePath, options = {}) { | ||||
|         return; | ||||
|     } | ||||
|      | ||||
|     await loadNoteDetailToContext(ctx, loadedNote, notePath); | ||||
| 
 | ||||
|     const loadPromise = loadNoteDetailToContext(ctx, loadedNote, notePath).then(() => { | ||||
|         if (activate) { | ||||
|             // will also trigger showTab via event
 | ||||
|         await tabRow.activateTab(ctx.$tab[0]); | ||||
|             return tabRow.activateTab(ctx.$tab[0]); | ||||
|         } | ||||
|         else { | ||||
|             return Promise.resolve(); | ||||
|         } | ||||
|     }); | ||||
| 
 | ||||
|     if (!options.async) { | ||||
|         await loadPromise; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -391,7 +391,8 @@ async function treeInitialized() { | ||||
|         await noteDetailService.loadNoteDetail(tab.notePath, { | ||||
|             state: tab, | ||||
|             newTab: true, | ||||
|             activate: tab.active | ||||
|             activate: tab.active, | ||||
|             async: true // faster initial load
 | ||||
|         }); | ||||
|     } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam