( options?: PomodoroStartOptions, context?: TaskNotesMutationContext )
| 2438 | } |
| 2439 | |
| 2440 | private async startPomodoro( |
| 2441 | options?: PomodoroStartOptions, |
| 2442 | context?: TaskNotesMutationContext |
| 2443 | ): Promise<PomodoroState> { |
| 2444 | const task = options?.taskPath ? await this.requireTask(options.taskPath) : undefined; |
| 2445 | await this.withMutationContext(task ? [task.path] : [], context, () => |
| 2446 | this.plugin.pomodoroService.startPomodoro(task, options?.duration) |
| 2447 | ); |
| 2448 | return this.copyPomodoroState(this.plugin.pomodoroService.getState()); |
| 2449 | } |
| 2450 | |
| 2451 | private async stopPomodoro(context?: TaskNotesMutationContext): Promise<PomodoroState> { |
| 2452 | await this.withMutationContext([], context, () => |
no test coverage detected