mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-06-05 21:49:13 +02:00
Switch only units when switch is tapped
This commit is contained in:
@ -134,12 +134,9 @@ class ConverterView @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun switch() {
|
private fun switch() {
|
||||||
binding.topUnitText.text.also {
|
|
||||||
binding.topUnitText.text = binding.bottomUnitText.text
|
|
||||||
binding.bottomUnitText.text = it
|
|
||||||
}
|
|
||||||
|
|
||||||
::topUnit.swapWith(::bottomUnit)
|
::topUnit.swapWith(::bottomUnit)
|
||||||
|
updateBottomValue()
|
||||||
|
updateUnitLabels()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateUnitLabels() {
|
private fun updateUnitLabels() {
|
||||||
|
Reference in New Issue
Block a user