mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
fix from pr (#801)
This commit is contained in:
parent
2d87983eca
commit
3ef8f3030c
2 changed files with 1 additions and 3 deletions
|
@ -398,7 +398,7 @@ class LibraryFragment : Fragment() {
|
|||
0,
|
||||
viewpager.adapter?.itemCount ?: 0
|
||||
)
|
||||
binding?.viewpager?.setCurrentItem(libraryViewModel.currentPage, false)
|
||||
binding?.viewpager?.setCurrentItem(libraryViewModel.getTabPosition().value ?: 0, false)
|
||||
|
||||
// Only stop loading after 300ms to hide the fade effect the viewpager produces when updating
|
||||
// Without this there would be a flashing effect:
|
||||
|
|
|
@ -41,8 +41,6 @@ class LibraryViewModel : ViewModel() {
|
|||
private val _pages: MutableLiveData<Resource<List<SyncAPI.Page>>> = MutableLiveData(null)
|
||||
val pages: LiveData<Resource<List<SyncAPI.Page>>> = _pages
|
||||
|
||||
var currentPage: Int = 0
|
||||
|
||||
private val _currentApiName: MutableLiveData<String> = MutableLiveData("")
|
||||
val currentApiName: LiveData<String> = _currentApiName
|
||||
|
||||
|
|
Loading…
Reference in a new issue