Summary: remove or demote our use of AsyncSequence
Split from #232. So that when you receive a state callback, inside the callback you can be sure that the object that changed state is in the state that update tells you it changed to (you don't have this guarantee with AsyncSequence because the iteration is performed asynchronously). And for consistency I think that we should also do it for non-state things e.g. messages, reactions, typing.
The work here would be:
I think we should also:
Notes:
┆Issue is synchronized with this Jira Task by Unito
Summary: remove or demote our use of
AsyncSequenceSplit from #232. So that when you receive a state callback, inside the callback you can be sure that the object that changed state is in the state that update tells you it changed to (you don't have this guarantee with
AsyncSequencebecause the iteration is performed asynchronously). And for consistency I think that we should also do it for non-state things e.g. messages, reactions, typing.The work here would be:
@specUntestedspec points that refer to being able to unsubscribeAsyncSequenceI think we should also:
AsyncSequenceAPI as a convenience (this is what Kotlin is doing with flows; see https://ably.atlassian.net/wiki/spaces/ENG/pages/3852795925/ADR-130+Adding+Flow+and+Jetpack+Compose+Support+to+Chat+SDK)AsyncSequence)Notes:
┆Issue is synchronized with this Jira Task by Unito