-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle coroutine cancelation on Activity lifecycle callbacks #48
Comments
You are right. To inject CoroutineScope is good and right idea. |
Ok, understand. Thank you for the explanation. |
Is there any example that implements this idea? |
@Amrjyniat check my repo https://github.com/hoc081098/kmp-viewmodel/tree/master/sample Sent from my 2201117TG using FastHub |
Support for canceling coroutines when Activity is destroyed is missing.
FeedStore
has hardcodedCoroutineScope(Dispatchers.Main)
which is not bound to any lifecycle callbacks.This hardcoded coroutine scope also makes writing unit tests hard (it could be simply a constructor parameter).
The text was updated successfully, but these errors were encountered: