From 6dd4be62d8ee788d94a20dbae831159273b233b5 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 18 Jun 2017 22:21:54 +0200 Subject: [PATCH] avoid refetching media at changing some settings --- .../com/simplemobiletools/gallery/activities/MainActivity.kt | 4 ++-- .../com/simplemobiletools/gallery/activities/MediaActivity.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 54f4bf8c9..0520b8d99 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -107,11 +107,11 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { override fun onResume() { super.onResume() if (mStoredAnimateGifs != config.animateGifs) { - mDirs.clear() + directories_grid.adapter.notifyDataSetChanged() } if (mStoredCropThumbnails != config.cropThumbnails) { - mDirs.clear() + directories_grid.adapter.notifyDataSetChanged() } tryloadGallery() invalidateOptionsMenu() 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 5934b96e8..9e5f7ccc1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -77,11 +77,11 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { override fun onResume() { super.onResume() if (mShowAll && mStoredAnimateGifs != config.animateGifs) { - mMedia.clear() + media_grid.adapter.notifyDataSetChanged() } if (mStoredCropThumbnails != config.cropThumbnails) { - mMedia.clear() + media_grid.adapter.notifyDataSetChanged() } tryloadGallery() invalidateOptionsMenu()