minor code style update
This commit is contained in:
parent
6a18f86ac7
commit
02e9040cdc
|
@ -521,12 +521,13 @@ class EditContactActivity : ContactActivity() {
|
||||||
val toggleIcon = contact_numbers_holder.getChildAt(i).default_toggle_icon
|
val toggleIcon = contact_numbers_holder.getChildAt(i).default_toggle_icon
|
||||||
val isPrimary = toggleIcon.tag == 1
|
val isPrimary = toggleIcon.tag == 1
|
||||||
|
|
||||||
val drawable = if (isPrimary) {
|
val drawableId = if (isPrimary) {
|
||||||
ContextCompat.getDrawable(this@EditContactActivity, R.drawable.ic_star_vector)
|
R.drawable.ic_star_vector
|
||||||
} else {
|
} else {
|
||||||
ContextCompat.getDrawable(this@EditContactActivity, R.drawable.ic_star_outline_vector)
|
R.drawable.ic_star_outline_vector
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val drawable = ContextCompat.getDrawable(this@EditContactActivity, drawableId)
|
||||||
drawable?.apply {
|
drawable?.apply {
|
||||||
mutate()
|
mutate()
|
||||||
setTint(getProperTextColor())
|
setTint(getProperTextColor())
|
||||||
|
@ -1230,9 +1231,7 @@ class EditContactActivity : ContactActivity() {
|
||||||
numberHolder.contact_number.requestFocus()
|
numberHolder.contact_number.requestFocus()
|
||||||
showKeyboard(numberHolder.contact_number)
|
showKeyboard(numberHolder.contact_number)
|
||||||
}
|
}
|
||||||
numberHolder.default_toggle_icon.apply {
|
numberHolder.default_toggle_icon.tag = 0
|
||||||
tag = 0
|
|
||||||
}
|
|
||||||
initNumberHolders()
|
initNumberHolders()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue