(task: TaskInfo)
| 745 | } |
| 746 | |
| 747 | protected async applySubtaskChanges(task: TaskInfo): Promise<void> { |
| 748 | const currentTaskFile = this.app.vault.getAbstractFileByPath(task.path); |
| 749 | if (!(currentTaskFile instanceof TFile)) return; |
| 750 | |
| 751 | const result = await applyTaskEditSubtaskChanges({ |
| 752 | parentTaskFile: currentTaskFile, |
| 753 | selectedSubtaskFiles: this.selectedSubtaskFiles, |
| 754 | initialSubtaskFiles: this.initialSubtaskFiles, |
| 755 | getTaskInfo: (path) => this.plugin.cacheManager.getTaskInfo(path), |
| 756 | buildProjectReference: (parentTaskFile, subtaskPath) => |
| 757 | this.buildProjectReference(parentTaskFile, subtaskPath), |
| 758 | updateTaskProjects: (subtaskInfo, updatedProjects) => |
| 759 | this.plugin.updateTaskProperty(subtaskInfo, "projects", updatedProjects), |
| 760 | onAddError: (error) => { |
| 761 | tasknotesLogger.error("Failed to add subtask relation:", { |
| 762 | category: "persistence", |
| 763 | operation: "add-subtask-relation", |
| 764 | error: error, |
| 765 | }); |
| 766 | }, |
| 767 | onRemoveError: (error) => { |
| 768 | tasknotesLogger.error("Failed to remove subtask relation:", { |
| 769 | category: "persistence", |
| 770 | operation: "remove-subtask-relation", |
| 771 | error: error, |
| 772 | }); |
| 773 | }, |
| 774 | }); |
| 775 | |
| 776 | this.initialSubtaskFiles = result.nextInitialSubtaskFiles; |
| 777 | } |
| 778 | |
| 779 | // Start expanded for edit modal - override parent property |
| 780 | protected isExpanded = true; |
no test coverage detected