天是天禄的天

This commit is contained in:
HapeLee
2025-11-14 00:07:21 +08:00
parent 610744754b
commit ba4f8e23a2
2 changed files with 4 additions and 2 deletions
@@ -184,8 +184,8 @@ class BooksFragment() : BaseFragment(R.layout.fragment_books),
}
fun upBookSort(sort: Int) {
if (!isAdded || view == null) return
binding.root.post {
if (!isAdded || view == null) return@post
arguments?.putInt("bookSort", sort)
bookSort = sort
upRecyclerData()
@@ -246,7 +246,7 @@ class BooksFragment() : BaseFragment(R.layout.fragment_books),
binding.emptyView.isGone = list.isNotEmpty()
binding.refreshLayout.isEnabled = enableRefresh && list.isNotEmpty()
booksAdapter.setItems(list)
delay(100)
delay(500)
}
}
}
@@ -51,6 +51,7 @@ import io.legado.app.utils.showDialogFragment
import io.legado.app.utils.viewbindingdelegate.viewBinding
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.conflate
import kotlinx.coroutines.flow.flowOn
@@ -303,6 +304,7 @@ class BookshelfFragment2() : BaseBookshelfFragment(R.layout.fragment_bookshelf2)
booksAdapter.updateItems()
binding.emptyView.isGone = getItemCount() > 0
binding.refreshLayout.isEnabled = enableRefresh && getItemCount() > 0
delay(500)
}
}
}