refresh the thumbnails if Crop Thumbnails has changed
This commit is contained in:
parent
e9115530ea
commit
25a46f18f4
|
@ -47,6 +47,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
private var mIsThirdPartyIntent = false
|
private var mIsThirdPartyIntent = false
|
||||||
private var mIsGettingDirs = false
|
private var mIsGettingDirs = false
|
||||||
private var mStoredAnimateGifs = true
|
private var mStoredAnimateGifs = true
|
||||||
|
private var mStoredCropThumbnails = true
|
||||||
|
|
||||||
private var mCurrAsyncTask: GetDirectoriesAsynctask? = null
|
private var mCurrAsyncTask: GetDirectoriesAsynctask? = null
|
||||||
|
|
||||||
|
@ -66,6 +67,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
directories_refresh_layout.setOnRefreshListener({ getDirectories() })
|
directories_refresh_layout.setOnRefreshListener({ getDirectories() })
|
||||||
mDirs = ArrayList<Directory>()
|
mDirs = ArrayList<Directory>()
|
||||||
mStoredAnimateGifs = config.animateGifs
|
mStoredAnimateGifs = config.animateGifs
|
||||||
|
mStoredCropThumbnails = config.cropThumbnails
|
||||||
storeStoragePaths()
|
storeStoragePaths()
|
||||||
checkWhatsNewDialog()
|
checkWhatsNewDialog()
|
||||||
}
|
}
|
||||||
|
@ -101,6 +103,10 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
if (mStoredAnimateGifs != config.animateGifs) {
|
if (mStoredAnimateGifs != config.animateGifs) {
|
||||||
mDirs.clear()
|
mDirs.clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mStoredCropThumbnails != config.cropThumbnails) {
|
||||||
|
mDirs.clear()
|
||||||
|
}
|
||||||
tryloadGallery()
|
tryloadGallery()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,6 +117,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
directories_refresh_layout.isRefreshing = false
|
directories_refresh_layout.isRefreshing = false
|
||||||
mIsGettingDirs = false
|
mIsGettingDirs = false
|
||||||
mStoredAnimateGifs = config.animateGifs
|
mStoredAnimateGifs = config.animateGifs
|
||||||
|
mStoredCropThumbnails = config.cropThumbnails
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStop() {
|
override fun onStop() {
|
||||||
|
|
|
@ -45,6 +45,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
private var mShowAll = false
|
private var mShowAll = false
|
||||||
private var mLoadedInitialPhotos = false
|
private var mLoadedInitialPhotos = false
|
||||||
private var mStoredAnimateGifs = true
|
private var mStoredAnimateGifs = true
|
||||||
|
private var mStoredCropThumbnails = true
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
@ -58,6 +59,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
media_refresh_layout.setOnRefreshListener({ getMedia() })
|
media_refresh_layout.setOnRefreshListener({ getMedia() })
|
||||||
mPath = intent.getStringExtra(DIRECTORY)
|
mPath = intent.getStringExtra(DIRECTORY)
|
||||||
mStoredAnimateGifs = config.animateGifs
|
mStoredAnimateGifs = config.animateGifs
|
||||||
|
mStoredCropThumbnails = config.cropThumbnails
|
||||||
mShowAll = config.showAll
|
mShowAll = config.showAll
|
||||||
if (mShowAll)
|
if (mShowAll)
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(false)
|
supportActionBar?.setDisplayHomeAsUpEnabled(false)
|
||||||
|
@ -68,6 +70,10 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
if (mShowAll && mStoredAnimateGifs != config.animateGifs) {
|
if (mShowAll && mStoredAnimateGifs != config.animateGifs) {
|
||||||
mMedia.clear()
|
mMedia.clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mStoredCropThumbnails != config.cropThumbnails) {
|
||||||
|
mMedia.clear()
|
||||||
|
}
|
||||||
tryloadGallery()
|
tryloadGallery()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,6 +83,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
mIsGettingMedia = false
|
mIsGettingMedia = false
|
||||||
media_refresh_layout.isRefreshing = false
|
media_refresh_layout.isRefreshing = false
|
||||||
mStoredAnimateGifs = config.animateGifs
|
mStoredAnimateGifs = config.animateGifs
|
||||||
|
mStoredCropThumbnails = config.cropThumbnails
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun tryloadGallery() {
|
private fun tryloadGallery() {
|
||||||
|
|
Loading…
Reference in New Issue