Find a better way to write Kotlin Flow codes
I am try to write these code like flatMapConcat or flapMapLastest but it always triggers when variables are created with initialization with ViewModel, and not my idea.
So I hope there're some ways to create currentWeather stateFlow variable that only trigger something after locationRepository.location emit something, not at the creating.
fun onForegroundPermissionApproved() {
viewModelScope.launch {
locationRepository.location.collect { location ->...