Kirill Nayduik 2021-07-30 15:00:47 +03:00
parent f4490166c5
commit 1b59f2257d
1 changed files with 7 additions and 1 deletions

View File

@ -1,9 +1,15 @@
package ru.touchin.roboswag.mvi_arch.core
import android.os.Parcelable
import ru.touchin.roboswag.mvi_arch.marker.ViewAction
import ru.touchin.roboswag.mvi_arch.marker.ViewState
/**
* Used for setting arguments and initial state into Fragments
*/
fun <NavArgs : Parcelable, State, Action, VM, TFragment : MviFragment<NavArgs, State, Action, VM>>
fun <NavArgs : Parcelable,
State : ViewState,
Action : ViewAction,
VM : MviViewModel<NavArgs, Action, State>,
TFragment : MviFragment<NavArgs, State, Action, VM>>
TFragment.withArgs(navArgs: NavArgs) = apply { initArgs(navArgs) }