diff --git a/app/src/main/kotlin/cn/super12138/todo/logic/Repository.kt b/app/src/main/kotlin/cn/super12138/todo/logic/Repository.kt index 59a2686..b40a4f2 100644 --- a/app/src/main/kotlin/cn/super12138/todo/logic/Repository.kt +++ b/app/src/main/kotlin/cn/super12138/todo/logic/Repository.kt @@ -24,7 +24,7 @@ object Repository { * 获取全部未完成的待办 * @return List */ - suspend fun getAllUncomplete(): List { + suspend fun getAllIncomplete(): List { return withContext(Dispatchers.IO) { todoDao.getAllUnfinished() } diff --git a/app/src/main/kotlin/cn/super12138/todo/views/todo/ToDoFragmentViewModel.kt b/app/src/main/kotlin/cn/super12138/todo/views/todo/ToDoFragmentViewModel.kt index 57f96a4..be21703 100644 --- a/app/src/main/kotlin/cn/super12138/todo/views/todo/ToDoFragmentViewModel.kt +++ b/app/src/main/kotlin/cn/super12138/todo/views/todo/ToDoFragmentViewModel.kt @@ -19,7 +19,7 @@ class ToDoFragmentViewModel : ViewModel() { private fun loadToDos() { viewModelScope.launch { - val todos = Repository.getAllUncomplete() + val todos = Repository.getAllIncomplete() var count = 0 for (todo in todos) { todoList.add(ToDo(todo.uuid, todo.state, todo.content, todo.subject))