From 269ca4fe096acd019c1630e8f290a0e673515e09 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 8 Mar 2020 12:59:51 +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 --- .../app/ui/main/bookshelf/BookshelfFragment.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt index dc658914d..fa7229a45 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt @@ -137,13 +137,17 @@ class BookshelfFragment : VMBaseFragment(R.layout.fragment_b override fun upGroup() { synchronized(this) { + bookGroups.remove(AppConst.bookGroupAll) bookGroups.remove(AppConst.bookGroupLocal) bookGroups.remove(AppConst.bookGroupAudio) - if (getPrefBoolean("bookGroupAudio", true)) { - bookGroups.add(1, AppConst.bookGroupAudio) + if (AppConfig.bookGroupAudioShow) { + bookGroups.add(0, AppConst.bookGroupAudio) } - if (getPrefBoolean("bookGroupLocal", true)) { - bookGroups.add(1, AppConst.bookGroupLocal) + if (AppConfig.bookGroupLocalShow) { + bookGroups.add(0, AppConst.bookGroupLocal) + } + if (AppConfig.bookGroupAllShow) { + bookGroups.add(0, AppConst.bookGroupAll) } bookshelfAdapter.notifyDataSetChanged() }