-
Notifications
You must be signed in to change notification settings - Fork 169
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
feat(dashpay): add mix dash first warning dialog #1309
feat(dashpay): add mix dash first warning dialog #1309
Conversation
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.
Looks good
startActivity(Intent(requireContext(), CreateUsernameActivity::class.java)) | ||
lifecycleScope.launch { | ||
val shouldShowMixDashDialog = withContext(Dispatchers.IO) { createIdentityViewModel.shouldShowMixDash() } | ||
//withContext(Dispatchers.Main) { |
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.
I guess this is commented because it wasn't clear if needed or not. lifecycleScope
will execute in the main thread and shouldShowMixDash()
is dispatched in IO with the result being returned back to the main thread, so Dispatchers.Main
context indeed isn't needed.
viewModelScope
by default also runs in the main thread.
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.
I will remove the withContext(Dispatchers.Main)
comment
… into dashpay-feature-mix-dash-first
Issue being fixed or feature implemented
Related PR's and Dependencies
Screenshots / Videos
How Has This Been Tested?
Checklist: