diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index f8eff8659..e3462309e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -47,6 +47,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { private var mIsThirdPartyIntent = false private var mIsGettingDirs = false private var mStoredAnimateGifs = true + private var mStoredCropThumbnails = true private var mCurrAsyncTask: GetDirectoriesAsynctask? = null @@ -66,6 +67,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { directories_refresh_layout.setOnRefreshListener({ getDirectories() }) mDirs = ArrayList() mStoredAnimateGifs = config.animateGifs + mStoredCropThumbnails = config.cropThumbnails storeStoragePaths() checkWhatsNewDialog() } @@ -101,6 +103,10 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { if (mStoredAnimateGifs != config.animateGifs) { mDirs.clear() } + + if (mStoredCropThumbnails != config.cropThumbnails) { + mDirs.clear() + } tryloadGallery() } @@ -111,6 +117,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { directories_refresh_layout.isRefreshing = false mIsGettingDirs = false mStoredAnimateGifs = config.animateGifs + mStoredCropThumbnails = config.cropThumbnails } override fun onStop() { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index c50017626..cbc1d5090 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -45,6 +45,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { private var mShowAll = false private var mLoadedInitialPhotos = false private var mStoredAnimateGifs = true + private var mStoredCropThumbnails = true override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -58,6 +59,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { media_refresh_layout.setOnRefreshListener({ getMedia() }) mPath = intent.getStringExtra(DIRECTORY) mStoredAnimateGifs = config.animateGifs + mStoredCropThumbnails = config.cropThumbnails mShowAll = config.showAll if (mShowAll) supportActionBar?.setDisplayHomeAsUpEnabled(false) @@ -68,6 +70,10 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { if (mShowAll && mStoredAnimateGifs != config.animateGifs) { mMedia.clear() } + + if (mStoredCropThumbnails != config.cropThumbnails) { + mMedia.clear() + } tryloadGallery() } @@ -77,6 +83,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { mIsGettingMedia = false media_refresh_layout.isRefreshing = false mStoredAnimateGifs = config.animateGifs + mStoredCropThumbnails = config.cropThumbnails } private fun tryloadGallery() {