mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +08:00 
			
		
		
		
	fix(mobile): tree not closing after pressing menu item
This commit is contained in:
		
							parent
							
								
									e5f7b978e0
								
							
						
					
					
						commit
						a8f1abb77f
					
				| @ -6,7 +6,9 @@ | |||||||
| ## 🐞 Bugfixes | ## 🐞 Bugfixes | ||||||
| 
 | 
 | ||||||
| *   Calendar does not hide when clicking on a note by @JYC333 | *   Calendar does not hide when clicking on a note by @JYC333 | ||||||
| *   [Unable to add internal link on mobile version](https://github.com/TriliumNext/Notes/issues/1677) | *   Mobile improvements: | ||||||
|  |     *   [Unable to add internal link on mobile version](https://github.com/TriliumNext/Notes/issues/1677) | ||||||
|  |     *   Note tree not closing when selecting some of the menu actions. | ||||||
| 
 | 
 | ||||||
| ## ✨ Improvements | ## ✨ Improvements | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -12,6 +12,7 @@ import { t } from "../services/i18n.js"; | |||||||
| import type NoteTreeWidget from "../widgets/note_tree.js"; | import type NoteTreeWidget from "../widgets/note_tree.js"; | ||||||
| import type FAttachment from "../entities/fattachment.js"; | import type FAttachment from "../entities/fattachment.js"; | ||||||
| import type { SelectMenuItemEventListener } from "../components/events.js"; | import type { SelectMenuItemEventListener } from "../components/events.js"; | ||||||
|  | import utils from "../services/utils.js"; | ||||||
| 
 | 
 | ||||||
| // TODO: Deduplicate once client/server is well split.
 | // TODO: Deduplicate once client/server is well split.
 | ||||||
| interface ConvertToAttachmentResponse { | interface ConvertToAttachmentResponse { | ||||||
| @ -204,6 +205,10 @@ export default class TreeContextMenu implements SelectMenuItemEventListener<Tree | |||||||
|     async selectMenuItemHandler({ command, type, templateNoteId }: MenuCommandItem<TreeCommandNames>) { |     async selectMenuItemHandler({ command, type, templateNoteId }: MenuCommandItem<TreeCommandNames>) { | ||||||
|         const notePath = treeService.getNotePath(this.node); |         const notePath = treeService.getNotePath(this.node); | ||||||
| 
 | 
 | ||||||
|  |         if (utils.isMobile()) { | ||||||
|  |             this.treeWidget.triggerCommand("setActiveScreen", { screen: "detail" }); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         if (command === "openInTab") { |         if (command === "openInTab") { | ||||||
|             appContext.tabManager.openTabWithNoteWithHoisting(notePath); |             appContext.tabManager.openTabWithNoteWithHoisting(notePath); | ||||||
|         } else if (command === "insertNoteAfter") { |         } else if (command === "insertNoteAfter") { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran