From 27166b98e2204d4bad426565ddcf50fd67eadf80 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 28 Oct 2018 19:00:38 +0100 Subject: [PATCH] fix #1020, slideshow looping --- .../simplemobiletools/gallery/activities/ViewPagerActivity.kt | 4 ++-- 1 file changed, 2 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 8f03f378d..6fb63e5d4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -452,9 +452,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun slideshowEnded(forward: Boolean) { if (config.loopSlideshow) { if (forward) { - view_pager.setCurrentItem(view_pager.adapter!!.count - 1, false) - } else { view_pager.setCurrentItem(0, false) + } else { + view_pager.setCurrentItem(view_pager.adapter!!.count - 1, false) } } else { stopSlideshow()