[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-android] 01/02: [wallet] Implement new `balance-change' not
From: |
gnunet |
Subject: |
[taler-taler-android] 01/02: [wallet] Implement new `balance-change' notification |
Date: |
Mon, 17 Jul 2023 15:22:22 +0200 |
This is an automated email from the git hooks/post-receive script.
torsten-grote pushed a commit to branch master
in repository taler-android.
commit 9713c8ff3171dff36c5736692d2235c66cf2c948
Author: Iván Ávalos <avalos@disroot.org>
AuthorDate: Thu Jul 13 22:18:25 2023 -0600
[wallet] Implement new `balance-change' notification
---
wallet/src/main/java/net/taler/wallet/MainViewModel.kt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/wallet/src/main/java/net/taler/wallet/MainViewModel.kt
b/wallet/src/main/java/net/taler/wallet/MainViewModel.kt
index 53db2fd..7e0db6f 100644
--- a/wallet/src/main/java/net/taler/wallet/MainViewModel.kt
+++ b/wallet/src/main/java/net/taler/wallet/MainViewModel.kt
@@ -103,7 +103,11 @@ class MainViewModel(
if (payload.type == "waiting-for-retry") return // ignore ping)
Log.i(TAG, "Received notification from wallet-core: $payload")
- loadBalances()
+ // Only update balances when we're told they changed
+ if (payload.type == "balance-change") {
+ loadBalances()
+ }
+
if (payload.type in transactionNotifications)
viewModelScope.launch(Dispatchers.Main) {
// TODO notification API should give us a currency to update
// update currently selected transaction list
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.