From f282c5b0afd31e103ecaca0816c4ad20fb9103b3 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 26 Jun 2017 23:24:44 +0200 Subject: [PATCH] call notifyDataSetChanged on the viewpager adapter earlier --- .../simplemobiletools/gallery/activities/ViewPagerActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 330259f6c..b779db178 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -234,9 +234,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 || !isDestroyed) { view_pager.apply { adapter = pagerAdapter + adapter!!.notifyDataSetChanged() currentItem = mPos addOnPageChangeListener(this@ViewPagerActivity) - adapter!!.notifyDataSetChanged() } } }