From d2a665bb1d94571e807612a41171eaeab78cf135 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 6 Mar 2022 20:40:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9B=AE=E5=BD=95=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ui/book/toc/ChapterListAdapter.kt | 20 +++++++++---------- .../io/legado/app/ui/book/toc/TocActivity.kt | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt b/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt index 871c68c41..6e62c907a 100644 --- a/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt @@ -39,16 +39,16 @@ class ChapterListAdapter(context: Context, val callback: Callback) : override fun areContentsTheSame( oldItem: BookChapter, - newItem: BookChapter - ): Boolean { - return oldItem.bookUrl == newItem.bookUrl - && oldItem.url == newItem.url - && oldItem.isVip == newItem.isVip - && oldItem.isPay == newItem.isPay - && oldItem.title == newItem.title - && oldItem.tag == newItem.tag - && oldItem.isVolume == newItem.isVolume - } + newItem: BookChapter + ): Boolean { + return oldItem.bookUrl == newItem.bookUrl + && oldItem.url == newItem.url + && oldItem.isVip == newItem.isVip + && oldItem.isPay == newItem.isPay + && oldItem.title == newItem.title + && oldItem.tag == newItem.tag + && oldItem.isVolume == newItem.isVolume + } } diff --git a/app/src/main/java/io/legado/app/ui/book/toc/TocActivity.kt b/app/src/main/java/io/legado/app/ui/book/toc/TocActivity.kt index e937a3176..f0134f914 100644 --- a/app/src/main/java/io/legado/app/ui/book/toc/TocActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/toc/TocActivity.kt @@ -83,6 +83,7 @@ class TocActivity : VMBaseActivity() { override fun onCompatOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { R.id.menu_reverse_toc -> viewModel.reverseToc { + viewModel.chapterListCallBack?.clearDisplayTitle() viewModel.chapterListCallBack?.upChapterList(searchView?.query?.toString()) setResult(RESULT_OK, Intent().apply { putExtra("index", it.durChapterIndex)