Skip to content

Commit daecd7d

Browse files
committed
returning the error result directly from the when
1 parent 82feda4 commit daecd7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthPhoneConfirmationFragment.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ class FtueAuthPhoneConfirmationFragment @Inject constructor() : AbstractFtueAuth
6767
}
6868

6969
override fun onError(throwable: Throwable) {
70-
when (throwable) {
70+
views.phoneConfirmationInput.error = when (throwable) {
7171
// The entered code is not correct
72-
is Failure.SuccessError -> views.phoneConfirmationInput.error = getString(R.string.login_validation_code_is_not_correct)
73-
else -> views.phoneConfirmationInput.error = errorFormatter.toHumanReadable(throwable)
72+
is Failure.SuccessError -> getString(R.string.login_validation_code_is_not_correct)
73+
else -> errorFormatter.toHumanReadable(throwable)
7474
}
7575
}
7676

0 commit comments

Comments
 (0)