mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-17 20:40:07 +03:00
code review
This commit is contained in:
parent
968377a5be
commit
3fe15f2d45
3 changed files with 4 additions and 4 deletions
|
@ -162,9 +162,10 @@ class BootstrapBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
|||
is BootstrapStep.GetBackupSecretPassForMigration -> state.step.useKey
|
||||
else -> true
|
||||
}
|
||||
val drawableRes = if (isKey) R.drawable.ic_message_key else R.drawable.ic_message_password
|
||||
bootstrapIcon.setImageDrawable(ContextCompat.getDrawable(
|
||||
requireContext(),
|
||||
R.drawable.ic_message_key.takeIf { isKey } ?: R.drawable.ic_message_password)
|
||||
drawableRes)
|
||||
)
|
||||
bootstrapTitleText.text = getString(R.string.upgrade_security)
|
||||
showFragment(BootstrapMigrateBackupFragment::class, Bundle())
|
||||
|
|
|
@ -125,8 +125,8 @@ class BootstrapMigrateBackupFragment @Inject constructor(
|
|||
|
||||
val secret = bootstrapMigrateEditText.text?.toString()
|
||||
if (secret.isNullOrBlank()) {
|
||||
bootstrapRecoveryKeyEnterTil.error = getString(R.string.recovery_key_empty_error_message).takeIf { isEnteringKey }
|
||||
?: getString(R.string.passphrase_empty_error_message)
|
||||
val errRes = if (isEnteringKey) R.string.recovery_key_empty_error_message else R.string.passphrase_empty_error_message
|
||||
bootstrapRecoveryKeyEnterTil.error = getString(errRes)
|
||||
} else if (isEnteringKey && !isValidRecoveryKey(secret)) {
|
||||
bootstrapRecoveryKeyEnterTil.error = getString(R.string.bootstrap_invalid_recovery_key)
|
||||
} else {
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
<!-- To produce things like 'RiotX Android (IQDHUVJTTV)' -->
|
||||
<string name="new_session_review_with_info">%1$s (%2$s)</string>
|
||||
|
||||
<!-- %s will be replaced by account_password -->
|
||||
<string name="bootstrap_migration_enter_backup_password">Enter your Key Backup Passphrase to continue.</string>
|
||||
<string name="bootstrap_migration_use_recovery_key">use your Key Backup recovery key</string>
|
||||
<!-- %s will be replaced by the value of bootstrap_migration_use_recovery_key -->
|
||||
|
|
Loading…
Add table
Reference in a new issue