|
|
@ -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 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|