mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2024-12-18 19:43:31 +01:00
do not attempt loading thumbnails after being loaded from cache
This commit is contained in:
parent
8545ab8430
commit
152a56c32b
@ -32,7 +32,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.simplemobiletools:commons:2.15.0'
|
||||
compile 'com.simplemobiletools:commons:2.15.2'
|
||||
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
|
||||
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
|
||||
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
||||
|
@ -167,6 +167,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||
directories_refresh_layout.isRefreshing = true
|
||||
} else {
|
||||
gotDirectories(dirs)
|
||||
return
|
||||
}
|
||||
|
||||
mCurrAsyncTask = GetDirectoriesAsynctask(applicationContext, mIsPickVideoIntent || mIsGetVideoContentIntent, mIsPickImageIntent || mIsGetImageContentIntent) {
|
||||
|
@ -217,15 +217,17 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||
return
|
||||
|
||||
mIsGettingMedia = true
|
||||
mLoadedInitialPhotos = true
|
||||
val token = object : TypeToken<List<Medium>>() {}.type
|
||||
val media = Gson().fromJson<ArrayList<Medium>>(config.loadFolderMedia(mPath), token) ?: ArrayList<Medium>(1)
|
||||
if (media.size == 0) {
|
||||
media_refresh_layout.isRefreshing = true
|
||||
} else {
|
||||
if (!mLoadedInitialPhotos)
|
||||
if (!mLoadedInitialPhotos) {
|
||||
gotMedia(media)
|
||||
return
|
||||
}
|
||||
}
|
||||
mLoadedInitialPhotos = true
|
||||
|
||||
mCurrAsyncTask = GetMediaAsynctask(applicationContext, mPath, mIsGetVideoIntent, mIsGetImageIntent, mShowAll) {
|
||||
gotMedia(it)
|
||||
|
Loading…
Reference in New Issue
Block a user