<Wait for first Flow emit and update second Flow w...
# stackoverflow
u
Wait for first Flow emit and update second Flow whenever there is a change on first one I implemented an API call and I would like to allow the user to choose the sort order, keeping the choice saved in Datastore Preferences. But I couldn't implement this idea, since both are returning a Flow, I don't know how to make one Flow wait for the other, and whenever the first one emits a new value, update the second. Some example code I'm trying: interface PreferencesRepository { fun getFilter(): Flow } class PreferencesRepositoryImpl @Inject constructor() : PreferencesRepository...