pull/1994/head
kunfei 2 years ago
parent 1b43d3cb63
commit fc8375f40e
  1. 1
      app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt
  2. 1
      app/src/main/java/io/legado/app/ui/book/local/ImportBookAdapter.kt
  3. 1
      app/src/main/java/io/legado/app/ui/book/remote/RemoteBookActivity.kt
  4. 1
      app/src/main/java/io/legado/app/ui/book/remote/RemoteBookAdapter.kt

@ -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()
} }

Loading…
Cancel
Save