mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	feat(tray): reload recent notes on change
This commit is contained in:
		
							parent
							
								
									ebc523a0fd
								
							
						
					
					
						commit
						60d8bc8238
					
				@ -163,6 +163,7 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded">
 | 
			
		||||
                    noteId: this.note?.noteId,
 | 
			
		||||
                    notePath: this.notePath
 | 
			
		||||
                });
 | 
			
		||||
                utils.reloadTray();
 | 
			
		||||
            }
 | 
			
		||||
        }, 5000);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -8,6 +8,11 @@ function reloadFrontendApp(reason?: string) {
 | 
			
		||||
    window.location.reload();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Triggers the system tray to update its menu items, i.e. after a change in dynamic content such as bookmarks or recent notes.
 | 
			
		||||
 *
 | 
			
		||||
 * On any other platform than Electron, nothing happens.
 | 
			
		||||
 */
 | 
			
		||||
function reloadTray() {
 | 
			
		||||
    if (!isElectron()) {
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user