From 84dd54f5a8accac5dd68ba9e3a0902922cfcf14a Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 1 Oct 2019 22:06:01 +0200 Subject: [PATCH] allow zooming portrait images --- .../gallery/pro/activities/ViewPagerActivity.kt | 4 ++-- .../simplemobiletools/gallery/pro/fragments/PhotoFragment.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt index baab0b9b9..92f8f46d2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt @@ -519,7 +519,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun scheduleSwipe() { mSlideshowHandler.removeCallbacksAndMessages(null) if (mIsSlideshowActive) { - if (getCurrentMedium()!!.isImage() || getCurrentMedium()!!.isGIF()) { + if (getCurrentMedium()!!.isImage() || getCurrentMedium()!!.isGIF() || getCurrentMedium()!!.isPortrait()) { mSlideshowHandler.postDelayed({ if (mIsSlideshowActive && !isDestroyed) { swipeToNextMedium() @@ -541,7 +541,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun getMediaForSlideshow(): Boolean { mSlideshowMedia = mMediaFiles.filter { - it.isImage() || (config.slideshowIncludeVideos && it.isVideo() || (config.slideshowIncludeGIFs && it.isGIF())) + it.isImage() || it.isPortrait() || (config.slideshowIncludeVideos && it.isVideo() || (config.slideshowIncludeGIFs && it.isGIF())) }.toMutableList() if (config.slideshowRandomOrder) { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt index 51b7b7992..c150cbfdf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt @@ -450,7 +450,7 @@ class PhotoFragment : ViewPagerFragment() { private fun scheduleZoomableView() { mLoadZoomableViewHandler.removeCallbacksAndMessages(null) mLoadZoomableViewHandler.postDelayed({ - if (mIsFragmentVisible && context?.config?.allowZoomingImages == true && mMedium.isImage() && !mIsSubsamplingVisible) { + if (mIsFragmentVisible && context?.config?.allowZoomingImages == true && (mMedium.isImage() || mMedium.isPortrait()) && !mIsSubsamplingVisible) { addZoomableView() } }, ZOOMABLE_VIEW_LOAD_DELAY)