优化
This commit is contained in:
@@ -108,6 +108,7 @@ class ImportBookActivity : VMBaseActivity<ActivityImportBookBinding, ImportBookV
|
|||||||
@SuppressLint("NotifyDataSetChanged")
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
override fun onClickSelectBarMainAction() {
|
override fun onClickSelectBarMainAction() {
|
||||||
viewModel.addToBookshelf(adapter.selectedUris) {
|
viewModel.addToBookshelf(adapter.selectedUris) {
|
||||||
|
adapter.selectedUris.clear()
|
||||||
adapter.notifyDataSetChanged()
|
adapter.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ class ImportBookAdapter(context: Context, val callBack: CallBack) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
notifyItemRangeChanged(0, itemCount, true)
|
||||||
callBack.upCountView()
|
callBack.upCountView()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ class RemoteBookActivity : VMBaseActivity<ActivityImportBookBinding, RemoteBookV
|
|||||||
override fun onClickSelectBarMainAction() {
|
override fun onClickSelectBarMainAction() {
|
||||||
waitDialog.show()
|
waitDialog.show()
|
||||||
viewModel.addToBookshelf(adapter.selected) {
|
viewModel.addToBookshelf(adapter.selected) {
|
||||||
|
adapter.selected.clear()
|
||||||
adapter.notifyDataSetChanged()
|
adapter.notifyDataSetChanged()
|
||||||
waitDialog.dismiss()
|
waitDialog.dismiss()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ class RemoteBookAdapter(context: Context, val callBack: CallBack) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
notifyItemRangeChanged(0, itemCount, true)
|
||||||
callBack.upCountView()
|
callBack.upCountView()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user