add getting args by fragment

This commit is contained in:
Rinat Nurmukhametov 2021-10-12 18:54:17 +03:00
parent 9e8b04e4a0
commit 8f76718cc5
1 changed files with 4 additions and 0 deletions

View File

@ -34,6 +34,10 @@ abstract class MviBottomSheet<NavArgs, State, Action, VM>(
arguments = bundleOf(MviFragment.INIT_ARGS_KEY to EmptyState)
}
protected val navArgs: NavArgs by lazy(mode = LazyThreadSafetyMode.NONE) {
arguments?.getParcelable<NavArgs>(MviFragment.INIT_ARGS_KEY) as NavArgs
}
@Inject
lateinit var viewModelMap: MutableMap<Class<out ViewModel>, ViewModelAssistedFactory<out ViewModel>>