mirror of
				https://github.com/SimpleMobileTools/Simple-Gallery.git
				synced 2025-06-05 21:59:19 +02:00 
			
		
		
		
	refresh the thumbnails if Crop Thumbnails has changed
This commit is contained in:
		| @@ -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<Directory>() | ||||
|         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() { | ||||
|   | ||||
| @@ -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() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user