mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	global note map should not rehoist
This commit is contained in:
		
							parent
							
								
									5ac332960e
								
							
						
					
					
						commit
						0f822b2761
					
				@ -61,8 +61,11 @@ class NoteContext extends Component {
 | 
			
		||||
 | 
			
		||||
        console.log(resolvedNotePath, "resolvedNotePath");
 | 
			
		||||
 | 
			
		||||
        if (this.hoistedNoteId === 'root' && this.notePath.startsWith("root/hidden")) {
 | 
			
		||||
            // hidden subtree displays only when hoisted so it doesn't make sense to keep root as hoisted note
 | 
			
		||||
        if (this.hoistedNoteId === 'root'
 | 
			
		||||
            && this.notePath.startsWith("root/hidden")
 | 
			
		||||
            && !this.note.hasLabel("keepCurrentHoisting")
 | 
			
		||||
        ) {
 | 
			
		||||
            // hidden subtree displays only when hoisted, so it doesn't make sense to keep root as hoisted note
 | 
			
		||||
 | 
			
		||||
            let hoistedNoteId = 'hidden';
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -60,6 +60,7 @@ module.exports = [
 | 
			
		||||
    { type: 'label', name: 'template' },
 | 
			
		||||
    { type: 'label', name: 'toc' },
 | 
			
		||||
    { type: 'label', name: 'color' },
 | 
			
		||||
    { type: 'label', name: 'keepCurrentHoisting'},
 | 
			
		||||
 | 
			
		||||
    // relation names
 | 
			
		||||
    { type: 'relation', name: 'internalLink' },
 | 
			
		||||
 | 
			
		||||
@ -36,7 +36,8 @@ const HIDDEN_SUBTREE_DEFINITION = {
 | 
			
		||||
            title: 'Note Map',
 | 
			
		||||
            type: 'noteMap',
 | 
			
		||||
            attributes: [
 | 
			
		||||
                { type: 'label', name: 'mapRootId', value: 'hoisted' }
 | 
			
		||||
                { type: 'label', name: 'mapRootNoteId', value: 'hoisted' },
 | 
			
		||||
                { type: 'label', name: 'keepCurrentHoisting' }
 | 
			
		||||
            ]
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user