From 0aa268ce2927f3dc2c5bcd82cda1dd270d08f093 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 20 Apr 2020 22:21:25 +0200 Subject: [PATCH] properly handle authentication skipping at videos too --- .../simplemobiletools/gallery/pro/activities/MediaActivity.kt | 4 ++++ .../gallery/pro/activities/PhotoVideoActivity.kt | 1 + 2 files changed, 5 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt index 766f4b99f..c67750636 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt @@ -866,6 +866,10 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { if (isVideo) { val extras = HashMap() extras[SHOW_FAVORITES] = mPath == FAVORITES + + if (shouldSkipAuthentication()) { + extras[SKIP_AUTHENTICATION] = true + } openPath(path, false, extras) } else { Intent(this, ViewPagerActivity::class.java).apply { 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 0c2112df0..27a010711 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 @@ -225,6 +225,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList private fun sendViewPagerIntent(path: String) { Intent(this, ViewPagerActivity::class.java).apply { + putExtra(SKIP_AUTHENTICATION, intent.getBooleanExtra(SKIP_AUTHENTICATION, false)) putExtra(SHOW_FAVORITES, intent.getBooleanExtra(SHOW_FAVORITES, false)) putExtra(IS_VIEW_INTENT, true) putExtra(IS_FROM_GALLERY, mIsFromGallery)