( path: string, archived: boolean, context?: TaskNotesMutationContext )
| 1997 | } |
| 1998 | |
| 1999 | async archiveTask( |
| 2000 | path: string, |
| 2001 | archived: boolean, |
| 2002 | context?: TaskNotesMutationContext |
| 2003 | ): Promise<TaskInfo> { |
| 2004 | const task = await this.requireTask(path); |
| 2005 | if (task.archived === archived) { |
| 2006 | return copyTaskInfo(task); |
| 2007 | } |
| 2008 | |
| 2009 | const updatedTask = await this.withMutationContext([task.path], context, () => |
| 2010 | this.plugin.taskService.toggleArchive(task) |
| 2011 | ); |
| 2012 | return copyTaskInfo(updatedTask); |
| 2013 | } |
| 2014 | |
| 2015 | async moveTask( |
| 2016 | path: string, |
no test coverage detected