From 883fa652631e3c55dc3316dee82dbdf95c995470 Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 16 Dec 2020 16:38:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/book/search/SearchAdapter.kt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt index 22605747d..0f92e549e 100644 --- a/app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt @@ -40,15 +40,16 @@ class SearchAdapter(context: Context, val callBack: CallBack) : override fun getChangePayload(oldItem: SearchBook, newItem: SearchBook): Any? { val payload = Bundle() - if (oldItem.name != newItem.name) payload.putString("name", newItem.name) - if (oldItem.author != newItem.author) payload.putString("author", newItem.author) if (oldItem.origins.size != newItem.origins.size) payload.putInt("origins", newItem.origins.size) - if (oldItem.coverUrl != newItem.coverUrl) payload.putString("cover", newItem.coverUrl) - if (oldItem.kind != newItem.kind) payload.putString("kind", newItem.kind) + if (oldItem.coverUrl != newItem.coverUrl) + payload.putString("cover", newItem.coverUrl) + if (oldItem.kind != newItem.kind) + payload.putString("kind", newItem.kind) if (oldItem.latestChapterTitle != newItem.latestChapterTitle) payload.putString("last", newItem.latestChapterTitle) - if (oldItem.intro != newItem.intro) payload.putString("intro", newItem.intro) + if (oldItem.intro != newItem.intro) + payload.putString("intro", newItem.intro) if (payload.isEmpty) return null return payload } @@ -106,9 +107,6 @@ class SearchAdapter(context: Context, val callBack: CallBack) : with(binding) { bundle.keySet().map { when (it) { - "name" -> tvName.text = searchBook.name - "author" -> tvAuthor.text = - context.getString(R.string.author_show, searchBook.author) "origins" -> bvOriginCount.setBadgeCount(searchBook.origins.size) "last" -> upLasted(binding, searchBook.latestChapterTitle) "intro" -> {