mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-07-01 22:20:57 +02:00
Save pair on all unit changes
This commit is contained in:
parent
4354d00652
commit
627ce5a785
@ -160,8 +160,8 @@ class ConverterViewModel @Inject constructor(
|
||||
_unitTo.update { allUnitsRepository.getCollectionByGroup(unit.group).first() }
|
||||
}
|
||||
incrementCounter(unit)
|
||||
updateCurrenciesRatesIfNeeded()
|
||||
saveLatestPairOfUnits()
|
||||
updateCurrenciesRatesIfNeeded()
|
||||
}
|
||||
|
||||
/**
|
||||
@ -182,6 +182,7 @@ class ConverterViewModel @Inject constructor(
|
||||
_unitFrom
|
||||
.getAndUpdate { _unitTo.value }
|
||||
.also { oldUnitFrom -> _unitTo.update { oldUnitFrom } }
|
||||
saveLatestPairOfUnits()
|
||||
updateCurrenciesRatesIfNeeded()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user