Fixes lack of zap amount refresh after zapping a note.
This commit is contained in:
@@ -1142,13 +1142,15 @@ fun ObserveZapAmountText(
|
|||||||
|
|
||||||
if (zapsState?.note?.zapPayments?.isNotEmpty() == true) {
|
if (zapsState?.note?.zapPayments?.isNotEmpty() == true) {
|
||||||
val zapAmountTxt by
|
val zapAmountTxt by
|
||||||
produceState(initialValue = showAmount(baseNote.zapsAmount), key1 = baseNote) {
|
produceState(initialValue = showAmount(baseNote.zapsAmount), key1 = zapsState) {
|
||||||
accountViewModel.calculateZapAmount(baseNote) { newZapAmount ->
|
zapsState?.note?.let {
|
||||||
|
accountViewModel.calculateZapAmount(it) { newZapAmount ->
|
||||||
if (value != newZapAmount) {
|
if (value != newZapAmount) {
|
||||||
value = newZapAmount
|
value = newZapAmount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
inner(zapAmountTxt)
|
inner(zapAmountTxt)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user