mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 00:35:26 +02:00
CLear input when switching between converter modes.
This commit is contained in:
parent
9d6de84323
commit
28935f31e0
@ -322,7 +322,7 @@ class MainViewModel @Inject constructor(
|
||||
*/
|
||||
fun updateUnitFrom(unit: AbstractUnit) {
|
||||
// We change from something to base converter or the other way around
|
||||
if ((_unitFrom.value?.group != UnitGroup.NUMBER_BASE) xor (unit.group == UnitGroup.NUMBER_BASE)) {
|
||||
if ((_unitFrom.value?.group == UnitGroup.NUMBER_BASE) xor (unit.group == UnitGroup.NUMBER_BASE)) {
|
||||
_calculated.update { null }
|
||||
clearInput()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user