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)