Updated on 2026-08-14
This commit is contained in:
parent
bf8c6e8c79
commit
6db5fde59a
1 changed files with 5 additions and 5 deletions
|
|
@ -16,7 +16,7 @@ import com.tangem.wallet.databinding.LayoutBackupAccessCodeBinding
|
|||
|
||||
class AccessCodeDialog(context: Context) : BottomSheetDialog(context) {
|
||||
|
||||
var binding: LayoutBackupAccessCodeBinding? = null
|
||||
private var binding: LayoutBackupAccessCodeBinding? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
|
@ -33,7 +33,7 @@ class AccessCodeDialog(context: Context) : BottomSheetDialog(context) {
|
|||
}
|
||||
}
|
||||
|
||||
fun showInfoScreen() = with(binding!!) {
|
||||
fun showInfoScreen() = binding?.run {
|
||||
behavior.state = BottomSheetBehavior.STATE_EXPANDED
|
||||
accessCodeTitle.text = context.getText(R.string.onboarding_access_code_intro_title)
|
||||
layoutBackupAccessCodeInfo.root.show()
|
||||
|
|
@ -43,7 +43,7 @@ class AccessCodeDialog(context: Context) : BottomSheetDialog(context) {
|
|||
}
|
||||
}
|
||||
|
||||
fun showEnterAccessCode() = with(binding!!) {
|
||||
fun showEnterAccessCode() = binding?.run {
|
||||
layoutBackupAccessCodeInfo.root.hide()
|
||||
layoutBackupAccessCodeSubmit.root.show()
|
||||
accessCodeTitle.text = context.getText(R.string.onboarding_access_code_intro_title)
|
||||
|
|
@ -56,7 +56,7 @@ class AccessCodeDialog(context: Context) : BottomSheetDialog(context) {
|
|||
}
|
||||
}
|
||||
|
||||
fun showReenterAccessCode() = with(binding!!) {
|
||||
fun showReenterAccessCode() = binding?.run {
|
||||
layoutBackupAccessCodeInfo.root.hide()
|
||||
layoutBackupAccessCodeSubmit.root.show()
|
||||
accessCodeTitle.text = context.getText(R.string.onboarding_access_code_repeat_code_title)
|
||||
|
|
@ -69,7 +69,7 @@ class AccessCodeDialog(context: Context) : BottomSheetDialog(context) {
|
|||
}
|
||||
}
|
||||
|
||||
fun showError(error: AccessCodeError?) = with(binding!!.layoutBackupAccessCodeSubmit) {
|
||||
fun showError(error: AccessCodeError?) = binding?.layoutBackupAccessCodeSubmit?.run {
|
||||
when (error) {
|
||||
AccessCodeError.CodeTooShort ->
|
||||
tilAccessCode.error = context.getString(R.string.onboarding_access_code_too_short)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue