kopia lustrzana https://github.com/ryukoposting/Signal-Android
Set custom amount on focus, do not clear on loss of focus.
rodzic
b80c844a0b
commit
3feb73789d
|
@ -200,7 +200,9 @@ class BoostFragment : DSLSettingsBottomSheetFragment(
|
|||
viewModel.setCustomAmount(it)
|
||||
},
|
||||
onCustomAmountFocusChanged = {
|
||||
viewModel.setCustomAmountFocused(it)
|
||||
if (it) {
|
||||
viewModel.setCustomAmountFocused()
|
||||
}
|
||||
}
|
||||
)
|
||||
)
|
||||
|
|
|
@ -217,8 +217,8 @@ class BoostViewModel(
|
|||
store.update { it.copy(customAmount = FiatMoney(bigDecimalAmount, it.customAmount.currency)) }
|
||||
}
|
||||
|
||||
fun setCustomAmountFocused(isFocused: Boolean) {
|
||||
store.update { it.copy(isCustomAmountFocused = isFocused) }
|
||||
fun setCustomAmountFocused() {
|
||||
store.update { it.copy(isCustomAmountFocused = true) }
|
||||
}
|
||||
|
||||
private data class BoostInfo(val boosts: List<Boost>, val defaultBoost: Boost?, val boostBadge: Badge, val supportedCurrencies: Set<Currency>)
|
||||
|
|
Ładowanie…
Reference in New Issue