Merge pull request #1714 from vector-im/feature/deactivated_account

i18n deactivated account error
This commit is contained in:
ganfra 2020-07-21 08:14:10 +02:00 committed by GitHub
commit dba9356472
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -21,7 +21,7 @@ Build 🧱:
- -
Other changes: Other changes:
- - i18n deactivated account error
Changes in Element 1.0.0 (2020-07-15) Changes in Element 1.0.0 (2020-07-15)
=================================================== ===================================================

View file

@ -51,7 +51,7 @@ class DefaultErrorFormatter @Inject constructor(
stringProvider.getString(R.string.login_error_unknown_host) stringProvider.getString(R.string.login_error_unknown_host)
is SSLPeerUnverifiedException -> is SSLPeerUnverifiedException ->
stringProvider.getString(R.string.login_error_ssl_peer_unverified) stringProvider.getString(R.string.login_error_ssl_peer_unverified)
is SSLException -> is SSLException ->
stringProvider.getString(R.string.login_error_ssl_other) stringProvider.getString(R.string.login_error_ssl_other)
else -> else ->
stringProvider.getString(R.string.error_no_network) stringProvider.getString(R.string.error_no_network)
@ -84,6 +84,9 @@ class DefaultErrorFormatter @Inject constructor(
throwable.error.code == MatrixError.M_THREEPID_NOT_FOUND -> { throwable.error.code == MatrixError.M_THREEPID_NOT_FOUND -> {
stringProvider.getString(R.string.login_reset_password_error_not_found) stringProvider.getString(R.string.login_reset_password_error_not_found)
} }
throwable.error.code == MatrixError.M_USER_DEACTIVATED -> {
stringProvider.getString(R.string.auth_invalid_login_deactivated_account)
}
else -> { else -> {
throwable.error.message.takeIf { it.isNotEmpty() } throwable.error.message.takeIf { it.isNotEmpty() }
?: throwable.error.code.takeIf { it.isNotEmpty() } ?: throwable.error.code.takeIf { it.isNotEmpty() }

View file

@ -2392,6 +2392,7 @@ Not all features in Riot are implemented in Element yet. Main missing (and comin
<string name="command_description_plain">Sends a message as plain text, without interpreting it as markdown</string> <string name="command_description_plain">Sends a message as plain text, without interpreting it as markdown</string>
<string name="auth_invalid_login_param_space_in_password">Incorrect username and/or password. The entered password starts or ends with spaces, please check it.</string> <string name="auth_invalid_login_param_space_in_password">Incorrect username and/or password. The entered password starts or ends with spaces, please check it.</string>
<string name="auth_invalid_login_deactivated_account">This account has been deactivated.</string>
<string name="room_message_placeholder">Message…</string> <string name="room_message_placeholder">Message…</string>