Jérémy CROS
04/15/2024, 3:16 PMprivate var hasFirstBeenEmitted : Boolean = false
at class level
Is there anyway to stay within the confines of flows?
Can provide more details on the implementation if it's too vague and it helps 🙂CLOVIS
04/15/2024, 3:20 PMJérémy CROS
04/15/2024, 3:39 PMstateIn
a view model and the blue dot is continuously updated on the map
the first location means we have managed to find the user indoor and want to display a one time thing to let them acknowledge that fact
hopefully that answers your question 😉CLOVIS
04/15/2024, 3:52 PMviewModelScope.launch {
val first = yourFlow.first()
toaster.show("The very first value is $first") // or whatever the first thing you want to do is
}
Jérémy CROS
04/17/2024, 8:24 AMfirst
documentation mentions the fact that it will cancel the flow collection... isn't that going to cancel all other subscription to the shared flow? Or am I confusing things?CLOVIS
04/17/2024, 8:41 AMSharedFlow
can be closed. I can't find any way to do it right off my head then 😓Jérémy CROS
04/17/2024, 9:05 AMCLOVIS
04/17/2024, 9:21 AMcollect
as well 🤔