( parentFile: TFile, subtask: TaskInfo )
| 1874 | } |
| 1875 | |
| 1876 | private async assignSelectedSubtaskToCurrentNote( |
| 1877 | parentFile: TFile, |
| 1878 | subtask: TaskInfo |
| 1879 | ): Promise<void> { |
| 1880 | try { |
| 1881 | await assignTaskAsSubtask(this, parentFile, subtask); |
| 1882 | } catch (error) { |
| 1883 | tasknotesLogger.error("Failed to assign selected subtask to current note:", { |
| 1884 | category: "persistence", |
| 1885 | operation: "assign-selected-subtask-current-note", |
| 1886 | error: error, |
| 1887 | }); |
| 1888 | new Notice( |
| 1889 | this.i18n.translate("contextMenus.task.organization.notices.addAsSubtaskFailed") |
| 1890 | ); |
| 1891 | } |
| 1892 | } |
| 1893 | |
| 1894 | /** |
| 1895 | * Create a new inline task at cursor position |
no test coverage detected