Add catch for candidate generation error to be treated the same as username unavailable.

This commit is contained in:
Alex Hart
2023-02-10 12:50:44 -04:00
committed by Greyson Parrelli
parent b14aea0922
commit cf250b4b32

View File

@@ -128,6 +128,7 @@ class UsernameEditViewModel extends ViewModel {
onNicknameUpdated(nickname);
}
break;
case CANDIDATE_GENERATION_ERROR:
case USERNAME_UNAVAILABLE:
uiState.update(state -> new State(ButtonState.SUBMIT_DISABLED, UsernameStatus.TAKEN, state.usernameState));
events.onNext(Event.SUBMIT_FAIL_TAKEN);