From 8465a781286bc9d095fdbbc395c707e86b8de5fb Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 29 Dec 2019 17:19:16 -0800 Subject: Fix viewpager id ref --- .../main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt index 62138b19..1c0471e2 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt @@ -807,8 +807,8 @@ abstract class BaseMainActivity : BaseActivity(), MainActivityContract, return false } - inline val currentFragment - get() = supportFragmentManager.findFragmentByTag("android:switcher:${R.id.container}:${contentBinding.viewpager.currentItem}") as BaseFragment + inline val currentFragment: BaseFragment + get() = supportFragmentManager.findFragmentByTag("android:switcher:${contentBinding.viewpager.id}:${contentBinding.viewpager.currentItem}") as BaseFragment override fun reloadFragment(fragment: BaseFragment) { runOnUiThread { adapter.reloadFragment(fragment) } -- cgit v1.2.3