mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	fix activating ribbon tabs after note switch
This commit is contained in:
		
							parent
							
								
									7d76fb8bf5
								
							
						
					
					
						commit
						5fdb462ed5
					
				@ -195,6 +195,12 @@ export default class RibbonContainer extends NoteContextAwareWidget {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    async noteSwitched() {
 | 
				
			||||||
 | 
					        this.lastActiveComponentId = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        await super.noteSwitched();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    async refreshWithNote(note, noExplicitActivation = false) {
 | 
					    async refreshWithNote(note, noExplicitActivation = false) {
 | 
				
			||||||
        this.lastNoteType = note.type;
 | 
					        this.lastNoteType = note.type;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -168,6 +168,10 @@ const OPTION_CLASSES = [
 | 
				
			|||||||
];
 | 
					];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default class SearchDefinitionWidget extends NoteContextAwareWidget {
 | 
					export default class SearchDefinitionWidget extends NoteContextAwareWidget {
 | 
				
			||||||
 | 
					    get name() {
 | 
				
			||||||
 | 
					        return "searchDefinition";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    isEnabled() {
 | 
					    isEnabled() {
 | 
				
			||||||
        return this.note && this.note.type === 'search';
 | 
					        return this.note && this.note.type === 'search';
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user