summaryrefslogtreecommitdiff
path: root/wallet
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-05-11 13:14:11 -0300
committerTorsten Grote <t@grobox.de>2020-05-11 13:14:11 -0300
commit4113c8e0d1cc8a31e2deff2aecacb6731050f9a3 (patch)
treed9b214bb01338b19ebcd675ca950a58e7153c6fe /wallet
parentbdb6f69dec8adfc3d44bfa006ef46984932a12d1 (diff)
downloadtaler-android-4113c8e0d1cc8a31e2deff2aecacb6731050f9a3.tar.gz
taler-android-4113c8e0d1cc8a31e2deff2aecacb6731050f9a3.tar.bz2
taler-android-4113c8e0d1cc8a31e2deff2aecacb6731050f9a3.zip
[wallet] refresh pending operations with each core notification
Diffstat (limited to 'wallet')
-rw-r--r--wallet/src/main/java/net/taler/wallet/MainViewModel.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/wallet/src/main/java/net/taler/wallet/MainViewModel.kt b/wallet/src/main/java/net/taler/wallet/MainViewModel.kt
index 159540b..c2ad2e0 100644
--- a/wallet/src/main/java/net/taler/wallet/MainViewModel.kt
+++ b/wallet/src/main/java/net/taler/wallet/MainViewModel.kt
@@ -69,6 +69,8 @@ class MainViewModel(val app: Application) : AndroidViewModel(app) {
transactionManager.showAll.postValue(it)
}
}
+ // refresh pending ops with each notification
+ if (devMode.value == true) pendingOperationsManager.getPending()
}
}
@@ -78,7 +80,8 @@ class MainViewModel(val app: Application) : AndroidViewModel(app) {
val withdrawManager = WithdrawManager(walletBackendApi)
val paymentManager = PaymentManager(walletBackendApi, mapper)
- val pendingOperationsManager = PendingOperationsManager(walletBackendApi)
+ val pendingOperationsManager: PendingOperationsManager =
+ PendingOperationsManager(walletBackendApi)
val transactionManager: TransactionManager = TransactionManager(walletBackendApi, mapper)
val refundManager = RefundManager(walletBackendApi)