Closed chrisbanes closed 6 years ago
My current workaround is to add a small delay to the observable:
imageProviderObservable
.delay(50, TimeUnit.MILLISECONDS, schedulers.io)
.execute { copy(seasons = it) }
@chrisbanes Loading
should be emitted before subscription to the observable happens.
Can you try to debug there?
Yep I saw the code but haven't had a chance to step back into MvRx yet (I won't be able to until Monday now).
This test also passes. If this could be reproduced with a failing test, that would be great.
Closing this. I can't recreate in tests, and I think I've worked out a bug in my app which is causing this. Thanks!
I've noticed a bit of weirdness since moving to MvRx. After debugging it today, it turns out that the emitting order using
execute()
is wrong for Observables which emit immediately:imageProviderObservable in this instance is a
BehaviorSubject
with a default value, so will always emit immediately on subscribe. If the Observable does not emit again, the final state isLoading
which is obviously wrong.