mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 19:25: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()
|
presenter.onCreate()
|
||||||
binding.swipeRefresh.isRefreshing = true
|
|
||||||
|
|
||||||
if (presenter.recentItems.isNotEmpty()) {
|
if (presenter.recentItems.isNotEmpty()) {
|
||||||
adapter.updateDataSet(presenter.recentItems)
|
adapter.updateDataSet(presenter.recentItems)
|
||||||
|
} else {
|
||||||
|
binding.frameLayout.alpha = 0f
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.downloadBottomSheet.dlBottomSheet.onCreate(this)
|
binding.downloadBottomSheet.dlBottomSheet.onCreate(this)
|
||||||
@ -371,6 +372,8 @@ class RecentsController(bundle: Bundle? = null) :
|
|||||||
shouldMoveToTop: Boolean = false
|
shouldMoveToTop: Boolean = false
|
||||||
) {
|
) {
|
||||||
if (view == null) return
|
if (view == null) return
|
||||||
|
binding.progress.isVisible = false
|
||||||
|
binding.frameLayout.alpha = 1f
|
||||||
binding.swipeRefresh.isRefreshing = LibraryUpdateService.isRunning()
|
binding.swipeRefresh.isRefreshing = LibraryUpdateService.isRunning()
|
||||||
adapter.removeAllScrollableHeaders()
|
adapter.removeAllScrollableHeaders()
|
||||||
adapter.updateItems(recents)
|
adapter.updateItems(recents)
|
||||||
|
@ -6,6 +6,12 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="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
|
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||||
android:id="@+id/swipe_refresh"
|
android:id="@+id/swipe_refresh"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Loading…
Reference in New Issue
Block a user