bbaldino
11/18/2020, 4:51 PMselect
expression in the 'parent' on a set of StateFlows
from the subcomponents, but I saw onReceive
isn't directly supported by StateFlow
. I tried using produceIn
on the StateFlow
so I could use onReceive
, but then I get the most recent state over and over. I looked at using distinctUntilChanged
on the StateFlow
, but then saw that has no effect...What should I go with here? I also can't 'miss' a value here, so maybe StateFlow
is the wrong tool?SharedFlow
seems to have similar problems. A normal Channel
does seem to get me the behavior I want, though I do miss the state-variable style of StateFlow
, though.Channel
, which I think I also need. So maybe I'll just implement a 'manual' select-type logic to monitor multiple SharedFlow
s