mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 19:49:01 +01:00 
			
		
		
		
	retry for OpenNoteButtonWidget
This commit is contained in:
		
							parent
							
								
									d345b7ed56
								
							
						
					
					
						commit
						4c7c53d8c8
					
				| @ -5,6 +5,18 @@ import froca from "../../services/froca.js"; | |||||||
| export default class OpenNoteButtonWidget extends ButtonWidget { | export default class OpenNoteButtonWidget extends ButtonWidget { | ||||||
|     targetNote(noteId) { |     targetNote(noteId) { | ||||||
|         froca.getNote(noteId).then(note => { |         froca.getNote(noteId).then(note => { | ||||||
|  |             if (!note) { | ||||||
|  |                 console.log(`Note ${noteId} has not been found. This might happen on the first run before the target note is created.`); | ||||||
|  | 
 | ||||||
|  |                 if (!this.retried) { | ||||||
|  |                     this.retried = true; | ||||||
|  | 
 | ||||||
|  |                     setTimeout(() => this.targetNote(noteId), 15000); // should be higher than timeout for createMissingSpecialNotes
 | ||||||
|  |                 } | ||||||
|  | 
 | ||||||
|  |                 return; | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|             this.icon(note.getIcon()); |             this.icon(note.getIcon()); | ||||||
|             this.title(note.title); |             this.title(note.title); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam