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 {