Hello. What is the best solution for replacing Sin...
# coroutines
v
Hello. What is the best solution for replacing SingleLiveEvent with coroutines? Explanation: I have some events. And multiples subscribers for these events. But I need only one time to consume this event in any of the subscribers.
c
SharedFlow is probably your best bet
i
This use case was specifically covered in Roman's blog post on Shared flows and channels (tl/dr: use a Channel and
receiveAsFlow()
): https://elizarov.medium.com/shared-flows-broadcast-channels-899b675e805c#49e3
👍 6
c
Still mean to follow up on that long thread from Muzei related to flow.