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.todoContext.text = todo.content
|
||||||
holder.todoSubject.text = todo.subject
|
holder.todoSubject.text = todo.subject
|
||||||
|
|
||||||
|
|
||||||
holder.itemView.setOnClickListener {
|
holder.itemView.setOnClickListener {
|
||||||
val infoBottomSheet = InfoBottomSheet.newInstance(
|
val infoBottomSheet = InfoBottomSheet.newInstance(
|
||||||
todo.content,
|
todo.content,
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@ class ToDoAdapter(private val todoList: MutableList<ToDo>, private val viewModel
|
||||||
notifyItemRangeChanged(position, todoList.size)
|
notifyItemRangeChanged(position, todoList.size)
|
||||||
|
|
||||||
todoViewModel.updateTask(todo.uuid)
|
todoViewModel.updateTask(todo.uuid)
|
||||||
progressViewModel.updateProgress()
|
|
||||||
|
|
||||||
// 设置空项目提示可见性
|
// 设置空项目提示可见性
|
||||||
if (todoList.isEmpty()) {
|
if (todoList.isEmpty()) {
|
||||||
|
|
@ -57,6 +56,7 @@ class ToDoAdapter(private val todoList: MutableList<ToDo>, private val viewModel
|
||||||
} else {
|
} else {
|
||||||
todoViewModel.emptyTipVis.value = View.GONE
|
todoViewModel.emptyTipVis.value = View.GONE
|
||||||
}
|
}
|
||||||
|
progressViewModel.updateProgress()
|
||||||
}
|
}
|
||||||
|
|
||||||
holder.delToDoBtn.setOnClickListener {
|
holder.delToDoBtn.setOnClickListener {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue