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