Daniil Borisovskii 2019-08-15 16:43:32 +03:00
parent 67f89bb9b1
commit 3793a2c8d6
1 changed files with 1 additions and 2 deletions

View File

@ -59,7 +59,7 @@ class BottomNavigationController(
}
}
fun detach() = callback?.let { fragmentManager.unregisterFragmentLifecycleCallbacks(it) }
fun detach() = callback?.let(fragmentManager::unregisterFragmentLifecycleCallbacks)
fun navigateTo(@IdRes itemId: Int, state: Parcelable? = null) {
// Find view controller class that needs to open
@ -76,7 +76,6 @@ class BottomNavigationController(
val viewControllerName = viewControllerClass.canonicalName
var fragment = fragmentManager.findFragmentByTag(viewControllerName)
//TODO: figure out do we need to remove exists fragment before instantiate him one more time
if (fragment != null) {
transaction.attach(fragment)
} else {