zak.taccardi
07/10/2022, 6:49 PMStateFlow<T>
instance, I want to log every emission of T
from the source standpoint. Is this possible without duplicating logs for each subscriber?.scan { .. }
.logEachState(logger)
.stateIn(scope)
But this will log duplicate values that are not emitted to subscribers.
We had a bug where T
was not immutable and was not emitting when it’s var
changed bc only the instance was mutated - (same instance will not be emitted twice in a row due to equality checks, even if the value changes)Dominaezzz
07/10/2022, 8:23 PMzak.taccardi
07/10/2022, 8:38 PMdoOnNext()
which returns a Flow<T>
- and I want a StateFlow<T>
Dominaezzz
07/10/2022, 8:43 PM.scan { .. }
.stateIn(scope)
.apply { logEachState(logger).launchIn(scope) }
distinctUntilChanged()
to your snippet I guess.stojan
07/11/2022, 9:25 AMonEach
DALDEI
07/27/2022, 11:13 PM