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() }