From 692c1233cd3dba0d2df06dc65ebef1fc1ecc1cad Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 29 Dec 2019 17:21:28 -0800 Subject: Cleanup --- .../kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/src') 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 1c0471e2..77b6224b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt @@ -231,7 +231,6 @@ abstract class BaseMainActivity : BaseActivity(), MainActivityContract, ) } } -// setupDrawer(savedInstanceState) L.i { "Main started in ${System.currentTimeMillis() - start} ms" } drawerWrapperBinding.initDrawer() contentBinding.initFab() @@ -808,7 +807,10 @@ abstract class BaseMainActivity : BaseActivity(), MainActivityContract, } inline val currentFragment: BaseFragment - get() = supportFragmentManager.findFragmentByTag("android:switcher:${contentBinding.viewpager.id}:${contentBinding.viewpager.currentItem}") as BaseFragment + get() { + val viewpager = contentBinding.viewpager + return supportFragmentManager.findFragmentByTag("android:switcher:${viewpager.id}:${viewpager.currentItem}") as BaseFragment + } override fun reloadFragment(fragment: BaseFragment) { runOnUiThread { adapter.reloadFragment(fragment) } -- cgit v1.2.3