Patrick Steiger

Results 16 comments of Patrick Steiger

Agreed that it must be explicit that `last()` shouldn't be used in `SharedFlow`, but instead of having different semantics from `Flow.last()`, which might be confusing, I'd prefer to have a...

What you can also do is waiting (suspending) until there is at least 1 collector before emitting to such flow. I haven't put much thought about it, but beware race...

@Psijic as an user of the current clustering library, I agree it begs for a complete rewrite in Compose mindset. Those are my superficial thoughts on this matter: 1) Given...

Should be a very simple function: ```kotlin // Original function @CheckReturnValue inline fun Observable.autoDispose(provider: ScopeProvider): ObservableSubscribeProxy = this.`as`(AutoDispose.autoDisposable(provider)) // Context receivers function context(ScopeProvider) inline fun Observable.autoDispose(): ObservableSubscribeProxy = autoDispose(this@ScopeProvider) ```

I'm thinking maybe you should convert your SharedFlow or Flow to StateFlow in your ViewModel using `stateIn()`. Views are Stateful and match better with StateFlow. They need an initial value,...

I see, @benjdero. Perhaps the `collectAsState()` method was modified after its introduction to require an initial value. Is your `locationFlow` a `StateFlow`? If it is, would it work to change...

Did you encounter a specific use case where you would rather have your suggested behavior instead of the current behavior? With that asked, in principle I agree with you: children...

@chriscoomber thanks a lot for your feedback. Indeed some more flexibility is welcome. Recently we introduced the possibility to use the onResume/onPause callbacks alternatively to onStart/onStop. I will carefully consider...

> Actually now that I go back and check i see that asLiveData() creates a live data which cancels in onInactive anway. So maybe simply using asLiveData is the best...

Hi @tom-pratt , Revisiting this question, I see that your worries about a delay for keeping upstream flow alive can (and should) be easily handled by the SharedFlow itself --...