Is it possible to reset a SharedFlow back to its initial state (if no subscribers are present)? I have a situation here where a system is reset, but a sharedflow containing notifications retains some notifications that were emitted prior to the reset. Aside from recreating the flow and re-assigning that new flow to all users of that flow, the only other option I’ve found is to make the contents of that flow nullable and then stuff nulls in the flow until its capacity is reached, and let future subscribers filter out nulls. This works, but isn’t exactly clean, and introduces nullable types in all subscribers.
EDIT: Nevermind, I somehow missed the
resetReplayCache function. Still, it is marked as experimental, so perhaps I missed it because it is very new?