From 48e78f529ecb4d8400bdfb807e6a95caa8f7829c Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 30 Nov 2017 18:34:12 +0100 Subject: [PATCH] rename mFragments to fragments at the pager adapter --- .../gallery/adapters/MyPagerAdapter.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MyPagerAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MyPagerAdapter.kt index 69c389d9e..0f5d7fee3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MyPagerAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MyPagerAdapter.kt @@ -14,7 +14,7 @@ import com.simplemobiletools.gallery.helpers.MEDIUM import com.simplemobiletools.gallery.models.Medium class MyPagerAdapter(val activity: ViewPagerActivity, fm: FragmentManager, val media: MutableList) : FragmentStatePagerAdapter(fm) { - private val mFragments = HashMap() + private val fragments = HashMap() override fun getCount() = media.size override fun getItem(position: Int): Fragment { @@ -38,19 +38,19 @@ class MyPagerAdapter(val activity: ViewPagerActivity, fm: FragmentManager, val m override fun instantiateItem(container: ViewGroup, position: Int): Any { val fragment = super.instantiateItem(container, position) as ViewPagerFragment - mFragments.put(position, fragment) + fragments.put(position, fragment) return fragment } override fun destroyItem(container: ViewGroup, position: Int, any: Any) { - mFragments.remove(position) + fragments.remove(position) super.destroyItem(container, position, any) } - fun getCurrentFragment(position: Int) = mFragments.get(position) + fun getCurrentFragment(position: Int) = fragments.get(position) fun toggleFullscreen(isFullscreen: Boolean) { - for ((pos, fragment) in mFragments) { + for ((pos, fragment) in fragments) { fragment.fullscreenToggled(isFullscreen) } }