Show loading indicator only on initial load

This commit is contained in:
Naveen Singh 2024-09-25 10:16:10 +05:30
parent 45db8c19aa
commit 654f0654a1
No known key found for this signature in database
GPG key ID: AF5D43C216778C0B
2 changed files with 7 additions and 2 deletions

View file

@ -49,6 +49,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
private var mAllowPickingMultiple = false private var mAllowPickingMultiple = false
private var mShowAll = false private var mShowAll = false
private var mLoadedInitialPhotos = false private var mLoadedInitialPhotos = false
private var mShowLoadingIndicator = false
private var mWasFullscreenViewOpen = false private var mWasFullscreenViewOpen = false
private var mLastSearchedText = "" private var mLastSearchedText = ""
private var mLatestMediaId = 0L private var mLatestMediaId = 0L
@ -395,7 +396,11 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
} }
} }
if (mShowLoadingIndicator) {
binding.loadingIndicator.show() binding.loadingIndicator.show()
mShowLoadingIndicator = false
}
getMedia() getMedia()
setupLayoutManager() setupLayoutManager()
} }

View file

@ -20,7 +20,7 @@
android:visibility="gone" android:visibility="gone"
app:hideAnimationBehavior="inward" app:hideAnimationBehavior="inward"
app:showAnimationBehavior="outward" app:showAnimationBehavior="outward"
app:showDelay="500" app:showDelay="300"
tools:visibility="visible" /> tools:visibility="visible" />
<RelativeLayout <RelativeLayout