From dc42dd566f29ed29294d8682feec24173ad28df2 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 6 Aug 2017 16:54:58 +0200 Subject: [PATCH] show hidden items in viewpager only if the selected item is hidden --- .../gallery/activities/ViewPagerActivity.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 fbdb2ca2a..b88493874 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -98,9 +98,10 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View return } - if (intent.extras?.containsKey(IS_VIEW_INTENT) == true) { - if (!config.isPasswordProtectionOn) + if (intent.extras?.containsKey(IS_VIEW_INTENT) == true && File(mPath).isHidden) { + if (!config.isPasswordProtectionOn) { config.temporarilyShowHidden = true + } } showSystemUI()