()
| 1675 | } |
| 1676 | |
| 1677 | async cycleCurrentTaskPriority(): Promise<void> { |
| 1678 | try { |
| 1679 | const taskInfo = await this.getCurrentTaskForCommand(); |
| 1680 | if (!taskInfo) { |
| 1681 | return; |
| 1682 | } |
| 1683 | |
| 1684 | const currentPriority = taskInfo.priority || this.settings.defaultTaskPriority; |
| 1685 | const nextPriority = this.priorityManager.getNextPriority(currentPriority); |
| 1686 | await this.updateTaskProperty(taskInfo, "priority", nextPriority); |
| 1687 | } catch (error) { |
| 1688 | tasknotesLogger.error("Failed to cycle current task priority:", { |
| 1689 | category: "persistence", |
| 1690 | operation: "cycle-current-task-priority", |
| 1691 | error: error, |
| 1692 | }); |
| 1693 | new Notice("Failed to cycle task priority"); |
| 1694 | } |
| 1695 | } |
| 1696 | |
| 1697 | private async getCurrentTaskForCommand( |
| 1698 | notTaskNotice = "Current file is not a task" |
no test coverage detected