Skip to content

Commit

Permalink
fix: use withContext(Dispatchers.IO)
Browse files Browse the repository at this point in the history
  • Loading branch information
HashEngineering committed Oct 30, 2024
1 parent 0557194 commit a70ae80
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ class RequestUserNameViewModel @Inject constructor(
fun submit() {
// Reset ui state for retry if needed
resetUiForRetrySubmit()
viewModelScope.launch(Dispatchers.IO) {
updateConfig()
viewModelScope.launch {
withContext(Dispatchers.IO) { updateConfig() }
// send the request / create username, assume not retry
val reuseTransaction = identity?.let {
it.usernameRequested == UsernameRequestStatus.LOCKED || it.usernameRequested == UsernameRequestStatus.LOST_VOTE
Expand Down

0 comments on commit a70ae80

Please sign in to comment.