diff options
Diffstat (limited to 'android/app/src/main')
| -rw-r--r-- | android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/LoginViewModel.kt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/LoginViewModel.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/LoginViewModel.kt index 4ec72c529d..cb4f151fd1 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/LoginViewModel.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/LoginViewModel.kt @@ -84,9 +84,10 @@ class LoginViewModel( } private fun AccountCreationResult.mapToUiState(): LoginUiState { - return when (this) { - is AccountCreationResult.Success -> LoginUiState.AccountCreated - AccountCreationResult.Failure -> LoginUiState.UnableToCreateAccountError + return if (this is AccountCreationResult.Success) { + LoginUiState.AccountCreated + } else { + LoginUiState.UnableToCreateAccountError } } |
