mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2025-01-11 02:29:10 +01:00
Adding a progress spinner for first load of recents
This commit is contained in:
parent
2f09ac8cb5
commit
3529378aac
@ -181,10 +181,11 @@ class RecentsController(bundle: Bundle? = null) :
|
||||
}
|
||||
|
||||
presenter.onCreate()
|
||||
binding.swipeRefresh.isRefreshing = true
|
||||
|
||||
if (presenter.recentItems.isNotEmpty()) {
|
||||
adapter.updateDataSet(presenter.recentItems)
|
||||
} else {
|
||||
binding.frameLayout.alpha = 0f
|
||||
}
|
||||
|
||||
binding.downloadBottomSheet.dlBottomSheet.onCreate(this)
|
||||
@ -371,6 +372,8 @@ class RecentsController(bundle: Bundle? = null) :
|
||||
shouldMoveToTop: Boolean = false
|
||||
) {
|
||||
if (view == null) return
|
||||
binding.progress.isVisible = false
|
||||
binding.frameLayout.alpha = 1f
|
||||
binding.swipeRefresh.isRefreshing = LibraryUpdateService.isRunning()
|
||||
adapter.removeAllScrollableHeaders()
|
||||
adapter.updateItems(recents)
|
||||
|
@ -6,6 +6,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="75dp"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh"
|
||||
android:layout_width="match_parent"
|
||||
|
Loading…
x
Reference in New Issue
Block a user