reactormonk
07/15/2022, 9:04 AMFlow
(think Flow<Card>
) - the callback should fire after the card has been disconnected. I'm currently on interface Card { var afterCardRemoval: Function<Unit>? }
and then firing from the scope producing the Flow<Card>
, but that feels kinda dirty.Joffrey
07/15/2022, 9:07 AM.onEach { afterCardRemoval = { ... } }
work for you?Robert Williams
07/15/2022, 9:08 AMreactormonk
07/15/2022, 9:09 AMFor instance, why doesn't .onEach { afterCardRemoval = { ... } } work for you?there's basically the
Flow<Event>
which I'm processing, and I'm wondering if I can change the API a bit.Robert Williams
07/15/2022, 9:14 AMreactormonk
07/15/2022, 9:16 AMRobert Williams
07/15/2022, 9:26 AMreactormonk
07/15/2022, 10:51 AMMutableStateFlow
, but there's a) how do I clean it up, aka how do I set the Flow
from the state to over? Make it a take()
is my current approach, but I'm not sure I like it. Also, how do I fire off an async
into the sunset? the coroutineScope { async { flow.collect { ... } } }
doesn't yield as I'd expect it to.gildor
07/16/2022, 3:10 PM