If I have a conflated `BroadcastChannel` and I sen...
# coroutines
d
If I have a conflated
BroadcastChannel
and I send something before using
asFlow()
on it, will I receive what was sent?
z
yes, the
ConflatedBroadcastChannel<T>
will replay emissions of
T
on initial subscription, even if you convert it to a
Flow<T>
The
ConflatedBroadcastChannel<T>
should be stored in your
ViewModel
to survive config changes
d
It's stored in the
Application
since the download is being done from a
Service
, but for some reason, we're not receiving the latest status...
z
make sure that you are subscribing to the same
ConflatedBroadcastChannel<T>
instance each time?
d
We are... the channel is a singleton in our DI and the
asFlow()
is run on it in a factory (to get a new instance every time it's injected).