From 86cea87b6c21bddee4447c8e0e135091699d09aa Mon Sep 17 00:00:00 2001 From: fengyuecanzhu <1021300691@qq.com> Date: Sat, 28 May 2022 22:12:35 +0800 Subject: [PATCH] fix search --- .../main/java/xyz/fycz/myreader/ui/adapter/SearchAdapter.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/xyz/fycz/myreader/ui/adapter/SearchAdapter.kt b/app/src/main/java/xyz/fycz/myreader/ui/adapter/SearchAdapter.kt index d081a45..8e9c0fa 100644 --- a/app/src/main/java/xyz/fycz/myreader/ui/adapter/SearchAdapter.kt +++ b/app/src/main/java/xyz/fycz/myreader/ui/adapter/SearchAdapter.kt @@ -24,6 +24,7 @@ import android.os.Bundle import android.os.Handler import android.os.Looper import android.text.TextUtils +import android.util.Log import android.view.View import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil @@ -386,7 +387,7 @@ class SearchAdapter( if (System.currentTimeMillis() >= postTime + 500) { handler.removeCallbacks(sendRunnable) postTime = System.currentTimeMillis() - setItems(mList) + setItems(ArrayList(mList)) } else { handler.removeCallbacks(sendRunnable) handler.postDelayed(sendRunnable, 500 - System.currentTimeMillis() + postTime)