From 6d4fcd0f189e38f73fb69d1ce609da409bba2ccd Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 16 Feb 2020 19:49:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../legado/app/ui/main/bookshelf/books/BooksAdapterList.kt | 4 ++-- .../legado/app/ui/main/bookshelf/books/BooksDiffCallBack.kt | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksAdapterList.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksAdapterList.kt index f4faaa5c1..755f55f20 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksAdapterList.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksAdapterList.kt @@ -38,8 +38,8 @@ class BooksAdapterList(context: Context, private val callBack: CallBack) : when (it) { "name" -> tv_name.text = item.name "author" -> tv_author.text = item.author - "durTitle" -> tv_read.text = item.durChapterTitle - "latestTitle" -> tv_last.text = item.latestChapterTitle + "dur" -> tv_read.text = item.durChapterTitle + "last" -> tv_last.text = item.latestChapterTitle "cover" -> iv_cover.load(item.getDisplayCover(), item.name, item.author) "refresh" -> if (item.origin != BookType.local && callBack.isUpdate(item.bookUrl)) { bv_unread.invisible() diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksDiffCallBack.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksDiffCallBack.kt index 40ceecf40..27954c634 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksDiffCallBack.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksDiffCallBack.kt @@ -48,11 +48,13 @@ class BooksDiffCallBack(private val oldItems: List, private val newItems: if (oldItem.author != newItem.author) bundle.putString("author", null) if (oldItem.durChapterTitle != newItem.durChapterTitle) - bundle.putString("durTitle", null) + bundle.putString("dur", null) if (oldItem.latestChapterTitle != newItem.latestChapterTitle) - bundle.putString("latestTitle", null) + bundle.putString("last", null) if (oldItem.getDisplayCover() != newItem.getDisplayCover()) bundle.putString("cover", null) + if (oldItem.lastCheckCount != newItem.lastCheckCount) + bundle.putString("refresh", null) if (oldItem.getUnreadChapterNum() != newItem.getUnreadChapterNum() || oldItem.lastCheckCount != newItem.lastCheckCount ) {