mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	removed dependency on note tree widget from app context
This commit is contained in:
		@@ -78,17 +78,17 @@ export default class Entrypoints extends Component {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    toggleNoteHoistingListener() {
 | 
			
		||||
        const node = appContext.getMainNoteTree().getActiveNode();
 | 
			
		||||
        const note = appContext.getActiveTabNote();
 | 
			
		||||
 | 
			
		||||
        hoistedNoteService.getHoistedNoteId().then(async hoistedNoteId => {
 | 
			
		||||
            if (node.data.noteId === hoistedNoteId) {
 | 
			
		||||
            if (note.noteId === hoistedNoteId) {
 | 
			
		||||
                hoistedNoteService.unhoist();
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                const note = await treeCache.getNote(node.data.noteId);
 | 
			
		||||
                const note = await treeCache.getNote(note.noteId);
 | 
			
		||||
 | 
			
		||||
                if (note.type !== 'search') {
 | 
			
		||||
                    hoistedNoteService.setHoistedNoteId(node.data.noteId);
 | 
			
		||||
                    hoistedNoteService.setHoistedNoteId(note.noteId);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user