From f05450aabc9f8b576cf2305b4c9c6de6c00c8ab5 Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 12 Aug 2021 23:29:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ui/main/bookshelf/style2/BookshelfFragment2.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BookshelfFragment2.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BookshelfFragment2.kt index 8621c5754..a78178258 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BookshelfFragment2.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BookshelfFragment2.kt @@ -112,6 +112,15 @@ class BookshelfFragment2 : BaseBookshelfFragment(R.layout.fragment_bookshelf1), @SuppressLint("NotifyDataSetChanged") private fun initBooksData() { + if (groupId == AppConst.bookGroupNoneId) { + binding.titleBar.title = getString(R.string.bookshelf) + } else { + bookGroups.forEach { + if (groupId == it.groupId) { + binding.titleBar.title = "${getString(R.string.bookshelf)}(${it.groupName})" + } + } + } booksFlowJob?.cancel() booksFlowJob = launch { when (groupId) {