This commit is contained in:
kunfei
2022-06-23 11:36:10 +08:00
parent 1b43d3cb63
commit fc8375f40e
4 changed files with 4 additions and 0 deletions
@@ -108,6 +108,7 @@ class ImportBookActivity : VMBaseActivity<ActivityImportBookBinding, ImportBookV
@SuppressLint("NotifyDataSetChanged")
override fun onClickSelectBarMainAction() {
viewModel.addToBookshelf(adapter.selectedUris) {
adapter.selectedUris.clear()
adapter.notifyDataSetChanged()
}
}
@@ -126,6 +126,7 @@ class ImportBookAdapter(context: Context, val callBack: CallBack) :
}
}
}
notifyItemRangeChanged(0, itemCount, true)
callBack.upCountView()
}
@@ -91,6 +91,7 @@ class RemoteBookActivity : VMBaseActivity<ActivityImportBookBinding, RemoteBookV
override fun onClickSelectBarMainAction() {
waitDialog.show()
viewModel.addToBookshelf(adapter.selected) {
adapter.selected.clear()
adapter.notifyDataSetChanged()
waitDialog.dismiss()
}
@@ -123,6 +123,7 @@ class RemoteBookAdapter(context: Context, val callBack: CallBack) :
}
}
}
notifyItemRangeChanged(0, itemCount, true)
callBack.upCountView()
}