Commit 0cc29350 authored by 石松洲's avatar 石松洲 Committed by John Wu

Navigate only if user has not left the fragment

parent 490a7849
...@@ -83,7 +83,7 @@ abstract class BaseFragment<Binding : ViewDataBinding> : Fragment(), ViewModelHo ...@@ -83,7 +83,7 @@ abstract class BaseFragment<Binding : ViewDataBinding> : Fragment(), ViewModelHo
} }
fun NavDirections.navigate() { fun NavDirections.navigate() {
navigation?.navigate(this) navigation?.currentDestination?.getAction(actionId)?.let { navigation!!.navigate(this) }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment