avoid always showing the Refreshing spinner at thumbnails view

This commit is contained in:
tibbi 2019-01-13 22:26:41 +01:00
parent 1935e3147b
commit 0b3b19bcd5
1 changed files with 3 additions and 4 deletions

View File

@ -558,7 +558,9 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
}
mIsGettingMedia = true
if (!mLoadedInitialPhotos) {
if (mLoadedInitialPhotos) {
startAsyncTask()
} else {
getCachedMedia(mPath, mIsGetVideoIntent, mIsGetImageIntent, mMediumDao) {
if (it.isEmpty()) {
runOnUiThread {
@ -569,9 +571,6 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
}
startAsyncTask()
}
} else {
media_refresh_layout.isRefreshing = true
startAsyncTask()
}
mLoadedInitialPhotos = true