Fixed the progress is not updated
This commit is contained in:
parent
a59d9a44a3
commit
d8cd2cd822
2 changed files with 2 additions and 3 deletions
|
|
@ -30,7 +30,6 @@ class AllTasksAdapter(private val todoList: MutableList<ToDo>,
|
|||
holder.todoContext.text = todo.content
|
||||
holder.todoSubject.text = todo.subject
|
||||
|
||||
|
||||
holder.itemView.setOnClickListener {
|
||||
val infoBottomSheet = InfoBottomSheet.newInstance(
|
||||
todo.content,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ class ToDoAdapter(private val todoList: MutableList<ToDo>, private val viewModel
|
|||
notifyItemRangeChanged(position, todoList.size)
|
||||
|
||||
todoViewModel.updateTask(todo.uuid)
|
||||
progressViewModel.updateProgress()
|
||||
|
||||
// 设置空项目提示可见性
|
||||
if (todoList.isEmpty()) {
|
||||
|
|
@ -57,6 +56,7 @@ class ToDoAdapter(private val todoList: MutableList<ToDo>, private val viewModel
|
|||
} else {
|
||||
todoViewModel.emptyTipVis.value = View.GONE
|
||||
}
|
||||
progressViewModel.updateProgress()
|
||||
}
|
||||
|
||||
holder.delToDoBtn.setOnClickListener {
|
||||
|
|
@ -72,7 +72,7 @@ class ToDoAdapter(private val todoList: MutableList<ToDo>, private val viewModel
|
|||
|
||||
todoViewModel.deleteTask(todo.uuid)
|
||||
progressViewModel.updateProgress()
|
||||
|
||||
|
||||
// 设置空项目提示可见性
|
||||
if (todoList.isEmpty()) {
|
||||
todoViewModel.emptyTipVis.value = View.VISIBLE
|
||||
|
|
|
|||
Loading…
Reference in a new issue