From fde725e98ea738a8df227523f9b4e4ff811c8fe6 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 21 Jan 2021 11:03:40 +0100 Subject: [PATCH] lets use the new GridDecoration only when needed, not by default --- .../gallery/pro/activities/MediaActivity.kt | 6 +++--- .../gallery/pro/adapters/MediaAdapter.kt | 8 ++++++++ .../gallery/pro/helpers/GridSpacingItemDecoration.kt | 4 ++++ 3 files changed, 15 insertions(+), 3 deletions(-) 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 19c361a43..731ac3e6d 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 @@ -157,13 +157,13 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { } if (mStoredThumbnailSpacing != config.thumbnailSpacing) { - handleGridSpacing() + media_grid.adapter = null + setupAdapter() } if (mStoredRoundedCorners != config.fileRoundedCorners) { - handleGridSpacing() media_grid.adapter = null - getMedia() + setupAdapter() } media_horizontal_fastscroller.updateBubbleColors() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt index 6f9b3a168..9139e10f9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt @@ -499,6 +499,14 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: ArrayList