do not attempt loading thumbnails after being loaded from cache
This commit is contained in:
parent
8545ab8430
commit
152a56c32b
3 changed files with 6 additions and 3 deletions
|
@ -32,7 +32,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
|
||||||
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
|
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
|
||||||
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
||||||
|
|
|
@ -167,6 +167,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
directories_refresh_layout.isRefreshing = true
|
directories_refresh_layout.isRefreshing = true
|
||||||
} else {
|
} else {
|
||||||
gotDirectories(dirs)
|
gotDirectories(dirs)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
mCurrAsyncTask = GetDirectoriesAsynctask(applicationContext, mIsPickVideoIntent || mIsGetVideoContentIntent, mIsPickImageIntent || mIsGetImageContentIntent) {
|
mCurrAsyncTask = GetDirectoriesAsynctask(applicationContext, mIsPickVideoIntent || mIsGetVideoContentIntent, mIsPickImageIntent || mIsGetImageContentIntent) {
|
||||||
|
|
|
@ -217,15 +217,17 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
return
|
return
|
||||||
|
|
||||||
mIsGettingMedia = true
|
mIsGettingMedia = true
|
||||||
|
mLoadedInitialPhotos = true
|
||||||
val token = object : TypeToken<List<Medium>>() {}.type
|
val token = object : TypeToken<List<Medium>>() {}.type
|
||||||
val media = Gson().fromJson<ArrayList<Medium>>(config.loadFolderMedia(mPath), token) ?: ArrayList<Medium>(1)
|
val media = Gson().fromJson<ArrayList<Medium>>(config.loadFolderMedia(mPath), token) ?: ArrayList<Medium>(1)
|
||||||
if (media.size == 0) {
|
if (media.size == 0) {
|
||||||
media_refresh_layout.isRefreshing = true
|
media_refresh_layout.isRefreshing = true
|
||||||
} else {
|
} else {
|
||||||
if (!mLoadedInitialPhotos)
|
if (!mLoadedInitialPhotos) {
|
||||||
gotMedia(media)
|
gotMedia(media)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mLoadedInitialPhotos = true
|
|
||||||
|
|
||||||
mCurrAsyncTask = GetMediaAsynctask(applicationContext, mPath, mIsGetVideoIntent, mIsGetImageIntent, mShowAll) {
|
mCurrAsyncTask = GetMediaAsynctask(applicationContext, mPath, mIsGetVideoIntent, mIsGetImageIntent, mShowAll) {
|
||||||
gotMedia(it)
|
gotMedia(it)
|
||||||
|
|
Loading…
Reference in a new issue