From a8bfae66a7928b6d2415562eeb62ad2c55b39f96 Mon Sep 17 00:00:00 2001 From: Naveen Date: Mon, 4 Jul 2022 16:10:19 +0530 Subject: [PATCH] Clear cached media only for external intents --- .../gallery/pro/activities/PhotoVideoActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt index 732cc416e..8660bd1c3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt @@ -288,7 +288,9 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList } private fun openViewPager(path: String) { - MediaActivity.mMedia.clear() + if (!intent.getBooleanExtra(IS_FROM_GALLERY, false)) { + MediaActivity.mMedia.clear() + } runOnUiThread { hideKeyboard() Intent(this, ViewPagerActivity::class.java).apply {