mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Fix some things I did on accident
This commit is contained in:
parent
10a3ba0a70
commit
8e9e50c89a
2 changed files with 5 additions and 1 deletions
|
@ -340,8 +340,11 @@ class LibraryFragment : Fragment() {
|
|||
observe(libraryViewModel.pages) { resource ->
|
||||
when (resource) {
|
||||
is Resource.Success -> {
|
||||
handler.removeCallbacks(startLoading)
|
||||
val pages = resource.value
|
||||
val showNotice = pages.all { it.items.isEmpty() }
|
||||
|
||||
|
||||
binding?.apply {
|
||||
emptyListTextview.isVisible = showNotice
|
||||
if (showNotice) {
|
||||
|
@ -418,10 +421,12 @@ class LibraryFragment : Fragment() {
|
|||
}.attach()
|
||||
}
|
||||
}
|
||||
|
||||
is Resource.Loading -> {
|
||||
// Only start loading after 200ms to prevent loading cached lists
|
||||
handler.postDelayed(startLoading, 200)
|
||||
}
|
||||
|
||||
is Resource.Failure -> {
|
||||
stopLoading.run()
|
||||
// No user indication it failed :(
|
||||
|
|
|
@ -95,7 +95,6 @@ class LibraryViewModel : ViewModel() {
|
|||
val library = (libraryResource as? Resource.Success)?.value ?: return@let
|
||||
|
||||
sortingMethods = library.supportedListSorting.toList()
|
||||
//currentSortingMethod = null
|
||||
|
||||
repo.requireLibraryRefresh = false
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue