(file: TFile, notTaskNotice?: string)
| 1742 | } |
| 1743 | |
| 1744 | private async openTaskEditModalForFile(file: TFile, notTaskNotice?: string): Promise<void> { |
| 1745 | try { |
| 1746 | const taskInfo = await this.cacheManager.getTaskInfo(file.path); |
| 1747 | if (!taskInfo) { |
| 1748 | new Notice( |
| 1749 | notTaskNotice ?? |
| 1750 | this.i18n.translate("modals.taskEdit.notices.fileMissing", { |
| 1751 | path: file.path, |
| 1752 | }) |
| 1753 | ); |
| 1754 | return; |
| 1755 | } |
| 1756 | |
| 1757 | await this.openTaskEditModal(taskInfo); |
| 1758 | } catch (error) { |
| 1759 | tasknotesLogger.error("Error opening task edit modal from file menu:", { |
| 1760 | category: "persistence", |
| 1761 | operation: "opening-task-edit-modal-file-menu", |
| 1762 | error: error, |
| 1763 | }); |
| 1764 | new Notice(this.i18n.translate("modals.taskEdit.notices.openNoteFailure")); |
| 1765 | } |
| 1766 | } |
| 1767 | |
| 1768 | private async openQuickActionsForTaskFile( |
| 1769 | file: TFile, |
no test coverage detected