mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-29 11:44:21 +08:00 
			
		
		
		
	more actions triggering new tab should respect current hoisting
This commit is contained in:
		
							parent
							
								
									3adab07ddb
								
							
						
					
					
						commit
						4d00404f55
					
				| @ -18,7 +18,7 @@ export default class RootCommandExecutor extends Component { | ||||
|     async showSQLConsoleCommand() { | ||||
|         const sqlConsoleNote = await dateNoteService.createSqlConsole(); | ||||
| 
 | ||||
|         const noteContext = await appContext.tabManager.openContextWithNote(sqlConsoleNote.noteId, { activate: true }); | ||||
|         const noteContext = await appContext.tabManager.openTabWithNoteWithHoisting(sqlConsoleNote.noteId, { activate: true }); | ||||
| 
 | ||||
|         appContext.triggerEvent('focusOnDetail', {ntxId: noteContext.ntxId}); | ||||
|     } | ||||
| @ -29,12 +29,8 @@ export default class RootCommandExecutor extends Component { | ||||
|         // force immediate search
 | ||||
|         await froca.loadSearchNote(searchNote.noteId); | ||||
| 
 | ||||
|         const activeNoteContext = appContext.tabManager.getActiveContext(); | ||||
|         const hoistedNoteId = activeNoteContext?.hoistedNoteId || 'root'; | ||||
| 
 | ||||
|         const noteContext = await appContext.tabManager.openContextWithNote(searchNote.noteId, { | ||||
|             activate: true, | ||||
|             hoistedNoteId | ||||
|         const noteContext = await appContext.tabManager.openTabWithNoteWithHoisting(searchNote.noteId, { | ||||
|             activate: true | ||||
|         }); | ||||
| 
 | ||||
|         appContext.triggerCommand('focusOnSearchDefinition', {ntxId: noteContext.ntxId}); | ||||
| @ -83,7 +79,7 @@ export default class RootCommandExecutor extends Component { | ||||
|     } | ||||
| 
 | ||||
|     async showBackendLogCommand() { | ||||
|         await appContext.tabManager.openContextWithNote('_backendLog', { activate: true }); | ||||
|         await appContext.tabManager.openTabWithNoteWithHoisting('_backendLog', { activate: true }); | ||||
|     } | ||||
| 
 | ||||
|     async showLaunchBarSubtreeCommand() { | ||||
| @ -124,7 +120,7 @@ export default class RootCommandExecutor extends Component { | ||||
|         const notePath = appContext.tabManager.getActiveContextNotePath(); | ||||
| 
 | ||||
|         if (notePath) { | ||||
|             await appContext.tabManager.openContextWithNote(notePath, { | ||||
|             await appContext.tabManager.openTabWithNoteWithHoisting(notePath, { | ||||
|                 activate: true, | ||||
|                 viewScope: { | ||||
|                     viewMode: 'source' | ||||
| @ -137,7 +133,7 @@ export default class RootCommandExecutor extends Component { | ||||
|         const notePath = appContext.tabManager.getActiveContextNotePath(); | ||||
| 
 | ||||
|         if (notePath) { | ||||
|             await appContext.tabManager.openContextWithNote(notePath, { | ||||
|             await appContext.tabManager.openTabWithNoteWithHoisting(notePath, { | ||||
|                 activate: true, | ||||
|                 viewScope: { | ||||
|                     viewMode: 'attachments' | ||||
| @ -150,7 +146,7 @@ export default class RootCommandExecutor extends Component { | ||||
|         const notePath = appContext.tabManager.getActiveContextNotePath(); | ||||
| 
 | ||||
|         if (notePath) { | ||||
|             await appContext.tabManager.openContextWithNote(notePath, { | ||||
|             await appContext.tabManager.openTabWithNoteWithHoisting(notePath, { | ||||
|                 activate: true, | ||||
|                 viewScope: { | ||||
|                     viewMode: 'attachments' | ||||
|  | ||||
| @ -79,7 +79,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain | ||||
|     this.openTabWithNote = async (notePath, activate) => { | ||||
|         await ws.waitForMaxKnownEntityChangeId(); | ||||
| 
 | ||||
|         await appContext.tabManager.openContextWithNote(notePath, { activate }); | ||||
|         await appContext.tabManager.openTabWithNoteWithHoisting(notePath, { activate }); | ||||
| 
 | ||||
|         if (activate) { | ||||
|             await appContext.triggerEvent('focusAndSelectTitle'); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam