-
Notifications
You must be signed in to change notification settings - Fork 0
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
Unify usage of coroutine scope across project #234
Conversation
app/src/main/java/ch/epfl/cs311/wanderwave/model/auth/AuthenticationController.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sonarcloud doesn't like us setting the dispatchers ourself, but I'm not sure there really is a way around that. LGTM, make sure to add the needed coverage and I'll approve it again 👍
Edit: Hadn't seen Tsogt's post
2600f7c
to
e7d5589
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forget to approve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the coroutine scope usage in our project. Now, everything can be called from a viewModel coroutine scope. You have also corrected the issue of manually setting the dispatchers by injecting dispatchers instead. I think you only need to increase the coverage and it will be ready to merge. Thanks for your good work.
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems perfect, thanks for that :)
Closes #208
The refactors the coroutine scope usage so that basically everything is callable from a viewmodel coroutine scope. Only in the actual model implementations of repositories that directly talk to a database/webserver or something we switch to the IO sope using
withContext(Dispatchers.IO) {}