Switch only units when switch is tapped

This commit is contained in:
Ensar Sarajčić 2023-09-11 14:48:27 +02:00
parent d38b5111a5
commit bbf6ba12c6
1 changed files with 2 additions and 5 deletions

View File

@ -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() {