Marc Knaup
04/20/2020, 3:53 PMFlow.distinctUntilChangedOrCollected()
or a simple way to implement it?
Basically a value in the Flow
should be ignored if
a) it’s equal to the previous value and
b) the previous value hasn’t been collected downstream yet (due to mapLatest
being slow).
If I only use distinctUntilChanged()
then the second value would obviously be ignored independent of b).streetsofboston
04/20/2020, 4:13 PMZach Klippenstein (he/him) [MOD]
04/20/2020, 4:33 PMdistinctUntilChanged()
+ conflate()
?Marc Knaup
04/20/2020, 5:42 PMdistinctUntilChanged()
is involved the second value would be lost as it’s not distinct to the previous one.
I basically need distinctUntilChanged()
forget about the previous value once it has been collected downstream.
Or maybe find a way where some upstream part of the Flow can be reset downstream 🤔streetsofboston
04/20/2020, 5:43 PM