Is there an equivalent of `collectLatest` that can be followed by `launchIn` instead of wrapping it ...
l
Is there an equivalent of
collectLatest
that can be followed by
launchIn
instead of wrapping it in a
launch
block? For now, I copied the implementation of
collectLatest
without the
collect
call but I was wondering if something already existed.
j
I haven't checked whether it's 100% equivalent, but maybe
mapLatest
+
launchIn
would do
l
The current implementation of
collectLatest
, at least in Kotlin 1.6.20, is
mapLatest(action).buffer(0).collect()
. I copied that and removed the collect. I wanted to know if a stable alternative existed