Switch only units when switch is tapped
This commit is contained in:
parent
d38b5111a5
commit
bbf6ba12c6
|
@ -134,12 +134,9 @@ class ConverterView @JvmOverloads constructor(
|
|||
}
|
||||
|
||||
private fun switch() {
|
||||
binding.topUnitText.text.also {
|
||||
binding.topUnitText.text = binding.bottomUnitText.text
|
||||
binding.bottomUnitText.text = it
|
||||
}
|
||||
|
||||
::topUnit.swapWith(::bottomUnit)
|
||||
updateBottomValue()
|
||||
updateUnitLabels()
|
||||
}
|
||||
|
||||
private fun updateUnitLabels() {
|
||||
|
|
Loading…
Reference in New Issue