mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 20:06:51 +03:00
Cleanup
This commit is contained in:
parent
dc7b3dfc9d
commit
d679c9d5d8
1 changed files with 5 additions and 5 deletions
|
@ -70,7 +70,7 @@ class KeysBackupRestoreFromPassphraseFragment @Inject constructor() : VectorBase
|
||||||
mPassphraseInputLayout.error = newValue
|
mPassphraseInputLayout.error = newValue
|
||||||
})
|
})
|
||||||
|
|
||||||
helperTextWithLink.text = spannableStringForHelperText(context!!)
|
helperTextWithLink.text = spannableStringForHelperText()
|
||||||
|
|
||||||
viewModel.showPasswordMode.observe(viewLifecycleOwner, Observer {
|
viewModel.showPasswordMode.observe(viewLifecycleOwner, Observer {
|
||||||
val shouldBeVisible = it ?: false
|
val shouldBeVisible = it ?: false
|
||||||
|
@ -87,9 +87,9 @@ class KeysBackupRestoreFromPassphraseFragment @Inject constructor() : VectorBase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun spannableStringForHelperText(context: Context): SpannableString {
|
private fun spannableStringForHelperText(): SpannableString {
|
||||||
val clickableText = context.getString(R.string.keys_backup_restore_use_recovery_key)
|
val clickableText = getString(R.string.keys_backup_restore_use_recovery_key)
|
||||||
val helperText = context.getString(R.string.keys_backup_restore_with_passphrase_helper_with_link, clickableText)
|
val helperText = getString(R.string.keys_backup_restore_with_passphrase_helper_with_link, clickableText)
|
||||||
|
|
||||||
val spanString = SpannableString(helperText)
|
val spanString = SpannableString(helperText)
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ class KeysBackupRestoreFromPassphraseFragment @Inject constructor() : VectorBase
|
||||||
fun onRestoreBackup() {
|
fun onRestoreBackup() {
|
||||||
val value = viewModel.passphrase.value
|
val value = viewModel.passphrase.value
|
||||||
if (value.isNullOrBlank()) {
|
if (value.isNullOrBlank()) {
|
||||||
viewModel.passphraseErrorText.value = context?.getString(R.string.passphrase_empty_error_message)
|
viewModel.passphraseErrorText.value = getString(R.string.passphrase_empty_error_message)
|
||||||
} else {
|
} else {
|
||||||
viewModel.recoverKeys(sharedViewModel)
|
viewModel.recoverKeys(sharedViewModel)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue