()
| 1150 | |
| 1151 | // Subtask management methods |
| 1152 | protected async openSubtaskSelector(): Promise<void> { |
| 1153 | await openTaskModalTaskSelector({ |
| 1154 | plugin: this.plugin, |
| 1155 | getCandidates: (allTasks) => |
| 1156 | getTaskModalSubtaskCandidates( |
| 1157 | allTasks, |
| 1158 | this.selectedSubtaskFiles, |
| 1159 | this.getCurrentTaskPath() |
| 1160 | ), |
| 1161 | onSelect: (subtask) => { |
| 1162 | const file = this.app.vault.getAbstractFileByPath(subtask.path); |
| 1163 | if (file) { |
| 1164 | this.addSubtask(file); |
| 1165 | } |
| 1166 | }, |
| 1167 | translate: (key) => this.t(key), |
| 1168 | noEligibleTasksMessageKey: "modals.task.organization.notices.noEligibleSubtasks", |
| 1169 | openFailedMessageKey: "modals.task.organization.notices.subtaskSelectFailed", |
| 1170 | logOperation: "open-subtask-selector", |
| 1171 | }); |
| 1172 | } |
| 1173 | |
| 1174 | protected addSubtask(file: TAbstractFile): void { |
| 1175 | const nextSubtaskFiles = addTaskModalSubtaskFile(this.selectedSubtaskFiles, file); |
nothing calls this directly
no test coverage detected