chore: convert if to kotlin let
This commit is contained in:
parent
6d9a6eb29f
commit
55927df935
1 changed files with 4 additions and 16 deletions
|
@ -250,22 +250,10 @@ class WizardDialog : DaggerDialogFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setA11yLabels() {
|
private fun setA11yLabels() {
|
||||||
val bgInputTextId = binding.bgInput.editText?.id
|
binding.bgInput.editText?.id?.let { binding.bgInputLabel.labelFor = it }
|
||||||
if (bgInputTextId != null) {
|
binding.carbsInput.editText?.id?.let { binding.carbsInputLabel.labelFor = it }
|
||||||
binding.bgInputLabel.labelFor = bgInputTextId
|
binding.correctionInput.editText?.id?.let { binding.correctionInputLabel.labelFor = it }
|
||||||
}
|
binding.carbTimeInput.editText?.id?.let { binding.carbTimeInputLabel.labelFor = it }
|
||||||
val carbsTextId = binding.carbsInput.editText?.id
|
|
||||||
if (carbsTextId != null) {
|
|
||||||
binding.carbsInputLabel.labelFor = carbsTextId
|
|
||||||
}
|
|
||||||
val corrTextId = binding.correctionInput.editText?.id
|
|
||||||
if (corrTextId != null) {
|
|
||||||
binding.correctionInputLabel.labelFor = corrTextId
|
|
||||||
}
|
|
||||||
val carbTimeTextId = binding.carbTimeInput.editText?.id
|
|
||||||
if (carbTimeTextId != null) {
|
|
||||||
binding.carbTimeInputLabel.labelFor = carbTimeTextId
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
|
|
Loading…
Reference in a new issue