diff --git a/app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt index e4a706a74..8de6a489c 100644 --- a/app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt @@ -283,11 +283,12 @@ class SearchActivity : VMBaseActivity(R.layout.activity_book_se */ @Synchronized private fun upSearchItems(items: List, isMandatoryUpdate: Boolean) { + val searchItems = ArrayList(items) if (isMandatoryUpdate || System.currentTimeMillis() - refreshTime > 500) { refreshTime = System.currentTimeMillis() val diffResult = - DiffUtil.calculateDiff(DiffCallBack(ArrayList(adapter.getItems()), items)) - adapter.setItems(items, diffResult) + DiffUtil.calculateDiff(DiffCallBack(adapter.getItems(), searchItems)) + adapter.setItems(searchItems, diffResult) } }