优化
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user