mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	don't allow to bring up delete dialog on saved search results (consistency with context menu)
This commit is contained in:
		
							parent
							
								
									23ebe360a6
								
							
						
					
					
						commit
						faeb55bc90
					
				@ -1252,7 +1252,12 @@ export default class NoteTreeWidget extends TabAwareWidget {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    async deleteNotesCommand({node}) {
 | 
					    async deleteNotesCommand({node}) {
 | 
				
			||||||
        const branchIds = this.getSelectedOrActiveBranchIds(node);
 | 
					        const branchIds = this.getSelectedOrActiveBranchIds(node)
 | 
				
			||||||
 | 
					            .filter(branchId => !branchId.startsWith('virt-')); // search results can't be deleted
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (!branchIds.length) {
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        await branchService.deleteNotes(branchIds);
 | 
					        await branchService.deleteNotes(branchIds);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user