From 8c207938aa1c6a99922bb5251642b814445fb0b2 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 15 Mar 2017 21:07:43 +0100 Subject: [PATCH] refresh the thumbnails view after editing a file --- .../gallery/activities/MediaActivity.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 20b547ab9..879c26d3a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -281,6 +281,16 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { private fun isSetWallpaperIntent() = intent.getBooleanExtra(SET_WALLPAPER_INTENT, false) + override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) { + if (requestCode == REQUEST_EDIT_IMAGE) { + if (resultCode == Activity.RESULT_OK && resultData != null) { + mMedia.clear() + refreshItems() + } + } + super.onActivityResult(requestCode, resultCode, resultData) + } + private fun itemClicked(path: String) { if (isSetWallpaperIntent()) { toast(R.string.setting_wallpaper)