From 78a75fe873bd3dafb8289571dc76baa1b28339cb Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 18 Jan 2021 19:48:42 +0100 Subject: [PATCH] refresh file thumbnails if the rounded corners setting changes --- .../gallery/pro/activities/MediaActivity.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt index 4eb5b7b06..00eff92ec 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt @@ -74,6 +74,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { private var mStoredCropThumbnails = true private var mStoredScrollHorizontally = true private var mStoredShowFileTypes = true + private var mStoredRoundedCorners = false private var mStoredTextColor = 0 private var mStoredPrimaryColor = 0 private var mStoredThumbnailSpacing = 0 @@ -158,6 +159,12 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { handleGridSpacing() } + if (mStoredRoundedCorners != config.fileRoundedCorners) { + handleGridSpacing() + media_grid.adapter = null + getMedia() + } + media_horizontal_fastscroller.updateBubbleColors() media_vertical_fastscroller.updateBubbleColors() media_refresh_layout.isEnabled = config.enablePullToRefresh @@ -304,6 +311,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { mStoredTextColor = textColor mStoredPrimaryColor = primaryColor mStoredThumbnailSpacing = thumbnailSpacing + mStoredRoundedCorners = fileRoundedCorners mShowAll = showAll } }