From 1b416028b48bbd3f09282649dc0e7dba8dbf3d50 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 15 Apr 2020 15:47:30 +0200 Subject: [PATCH] Code review: inline the error instead of using toast --- .../riotx/features/settings/VectorSettingsGeneralFragment.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/settings/VectorSettingsGeneralFragment.kt b/vector/src/main/java/im/vector/riotx/features/settings/VectorSettingsGeneralFragment.kt index 87b27ce452..b778fa02ef 100644 --- a/vector/src/main/java/im/vector/riotx/features/settings/VectorSettingsGeneralFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/settings/VectorSettingsGeneralFragment.kt @@ -789,9 +789,9 @@ class VectorSettingsGeneralFragment : VectorSettingsBaseFragment() { } showPasswordLoadingView(false) if (failure.isInvalidPassword()) { - activity.toast(R.string.settings_fail_to_update_password_invalid_current_password) + oldPasswordTil.error = getString(R.string.settings_fail_to_update_password_invalid_current_password) } else { - activity.toast(R.string.settings_fail_to_update_password) + oldPasswordTil.error = getString(R.string.settings_fail_to_update_password) } } })