pull/1649/head
kunfei 3 years ago
parent 95df233016
commit 11eed6f35d
  1. 6
      app/src/main/java/io/legado/app/base/adapter/DiffRecyclerAdapter.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/changecover/ChangeCoverViewModel.kt

@ -49,11 +49,7 @@ abstract class DiffRecyclerAdapter<ITEM, VB : ViewBinding>(protected val context
@Synchronized
fun setItems(items: List<ITEM>?) {
kotlin.runCatching {
if (items == null) {
asyncListDiffer.submitList(null)
} else {
asyncListDiffer.submitList(ArrayList(items))
}
asyncListDiffer.submitList(items)
}
}

@ -37,7 +37,7 @@ class ChangeCoverViewModel(application: Application) : BaseViewModel(application
searchSuccess = {
if (!searchBooks.contains(it)) {
searchBooks.add(it)
trySend(searchBooks)
trySend(ArrayList(searchBooks))
}
}

Loading…
Cancel
Save