pull/1222/head
gedoor 3 years ago
parent 090227d063
commit 4d281eb149
  1. 2
      app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BookshelfFragment2.kt

@ -120,7 +120,6 @@ class BookshelfFragment2 : BaseBookshelfFragment(R.layout.fragment_bookshelf1),
AppConst.bookGroupNoneId -> appDb.bookDao.flowNoGroup() AppConst.bookGroupNoneId -> appDb.bookDao.flowNoGroup()
else -> appDb.bookDao.flowByGroup(groupId) else -> appDb.bookDao.flowByGroup(groupId)
}.collect { list -> }.collect { list ->
binding.tvEmptyMsg.isGone = list.isNotEmpty()
books = when (getPrefInt(PreferKey.bookshelfSort)) { books = when (getPrefInt(PreferKey.bookshelfSort)) {
1 -> list.sortedByDescending { 1 -> list.sortedByDescending {
it.latestChapterTime it.latestChapterTime
@ -136,6 +135,7 @@ class BookshelfFragment2 : BaseBookshelfFragment(R.layout.fragment_bookshelf1),
} }
} }
booksAdapter.notifyDataSetChanged() booksAdapter.notifyDataSetChanged()
binding.tvEmptyMsg.isGone = getItemCount() > 0
} }
} }
} }

Loading…
Cancel
Save