Can we do something like this, but with `Coroutine...
# coroutines
s
Can we do something like this, but with
CoroutineScope
instead of a
Job
? I need to launch a few suspend functions, and cancel them if a) the parent scope is canceled b) the VH scope is canceled (whatever comes first)
l
Yes, that one works well.
j
@stojan just curious why would you want to use suspend in
ViewHolder
?
oh I see you want to launch suspend function on
VH
l
Being able to cancel a coroutine on unbind is pretty good for a bunch of use cases.
2
a
It lets you maintain ongoing reactive updates to RecyclerView items in a nice way
1