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 9f049fa4d..3982ce623 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -302,6 +302,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { } else { Intent(this, ViewPagerActivity::class.java).apply { putExtra(MEDIUM, path) + putExtra(SHOW_ALL, mShowAll) startActivity(this) } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index 9ab2b2717..2660ddf37 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -27,6 +27,7 @@ import com.simplemobiletools.gallery.fragments.ViewPagerFragment import com.simplemobiletools.gallery.helpers.MEDIUM import com.simplemobiletools.gallery.helpers.REQUEST_EDIT_IMAGE import com.simplemobiletools.gallery.helpers.REQUEST_SET_WALLPAPER +import com.simplemobiletools.gallery.helpers.SHOW_ALL import com.simplemobiletools.gallery.models.Medium import kotlinx.android.synthetic.main.activity_medium.* import java.io.File @@ -39,6 +40,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private var mIsFullScreen = false private var mPos = -1 + private var mShowAll = false override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -65,6 +67,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } } else { mPath = intent.getStringExtra(MEDIUM) + mShowAll = intent.getBooleanExtra(SHOW_ALL, false) } if (mPath.isEmpty()) { @@ -239,7 +242,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } private fun reloadViewPager() { - GetMediaAsynctask(applicationContext, mDirectory, false, false, ArrayList(), false) { + GetMediaAsynctask(applicationContext, mDirectory, false, false, ArrayList(), mShowAll) { mMedia = it if (isDirEmpty()) return@GetMediaAsynctask