I don't have an answer but aren't you coding in flow?
m
Marko Novakovic
11/01/2021, 9:07 AM
what is your usecase? for example, if you expose data from the
ViewModel
as
StateFlow
you can have
started = SharingStarted.WhileSubscribed()
inside
stateIn
. you also have
repeatOnLifecycle
and
flowWithLifecycle
methods for collecting flows. you can take a look how are they implemented, what do they do in order to work properly with compose. again, what is your usecase?
f
Florian
11/02/2021, 6:31 PM
@Yousef yes 👋 @Marko Novakovic thanks for the input. I actually don't need it anymore now 😅