优化
This commit is contained in:
@@ -111,7 +111,6 @@ class ChapterListFragment : VMBaseFragment<TocViewModel>(R.layout.fragment_chapt
|
||||
else -> appDb.bookChapterDao.flowSearch(viewModel.bookUrl, searchKey)
|
||||
}.collect {
|
||||
if (!(searchKey.isNullOrBlank() && it.isEmpty())) {
|
||||
binding.rotateLoading.show()
|
||||
val data = withContext(IO) {
|
||||
val replaces = viewModel.bookData.value?.let { book ->
|
||||
ContentProcessor.get(book.name, book.origin).getReplaceRules()
|
||||
@@ -126,7 +125,6 @@ class ChapterListFragment : VMBaseFragment<TocViewModel>(R.layout.fragment_chapt
|
||||
})
|
||||
}
|
||||
}
|
||||
binding.rotateLoading.hide()
|
||||
adapter.setItems(data, adapter.diffCallBack)
|
||||
if (searchKey.isNullOrBlank() && mLayoutManager.findFirstVisibleItemPosition() < 0) {
|
||||
mLayoutManager.scrollToPositionWithOffset(durChapterIndex, 0)
|
||||
|
||||
Reference in New Issue
Block a user