From d43e599f7445045250d41f6c6cbf87c0a6e945c0 Mon Sep 17 00:00:00 2001 From: Super12138 <70494801+Super12138@users.noreply.github.com> Date: Sat, 2 Mar 2024 14:34:51 +0800 Subject: [PATCH] Fixed typo --- app/src/main/kotlin/cn/super12138/todo/logic/Repository.kt | 2 +- .../cn/super12138/todo/views/todo/ToDoFragmentViewModel.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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))