Colton Idle
12/03/2021, 3:06 PMDominaezzz
12/03/2021, 3:12 PMDominaezzz
12/03/2021, 3:13 PMby
) is one way to achieve composition.Adam Powell
12/03/2021, 3:44 PMclass MyViewModel : ViewModel() {
val myBehavior = // ???
and then iterate from there. Represent the behavior as its own final class that accepts whatever dependencies it might needAdam Powell
12/03/2021, 3:45 PMAdam Powell
12/03/2021, 3:48 PMfun ViewModel.createMyBehavior(...): MyBehavior = MyBehaviorImpl(...).also {
viewModelScope.launch {
it.runOngoingBehaviorStuff()
}
}
Colton Idle
12/03/2021, 3:51 PMval myBehavior = // ???
is a starting point is nice. I will iteratie on this today and this weekend to see if I can come up with something. Thank you allDaniel
12/03/2021, 10:56 PM