gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] 181/204: don't update if same data


From: gnunet
Subject: [taler-taler-ios] 181/204: don't update if same data
Date: Thu, 05 Dec 2024 23:52:29 +0100

This is an automated email from the git hooks/post-receive script.

marc-stibane pushed a commit to branch master
in repository taler-ios.

commit c1a24c21f7bd3766308281469eceeb23da8f58d3
Author: Marc Stibane <marc@taler.net>
AuthorDate: Tue Dec 3 23:05:09 2024 +0100

    don't update if same data
---
 TalerWallet1/Controllers/Controller.swift | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/TalerWallet1/Controllers/Controller.swift 
b/TalerWallet1/Controllers/Controller.swift
index 2d4fe59..6a83ee5 100755
--- a/TalerWallet1/Controllers/Controller.swift
+++ b/TalerWallet1/Controllers/Controller.swift
@@ -121,11 +121,16 @@ class Controller: ObservableObject {
     @discardableResult
     func loadBalances(_ stack: CallStack,_ model: WalletModel) async -> Int? {
         if let reloaded = try? await model.getBalances(stack.push()) {
-            for balance in reloaded {
-                let scope = balance.scopeInfo
-                checkInfo(for: scope, model: model)
+            if reloaded != balances {
+                for balance in reloaded {
+                    let scope = balance.scopeInfo
+                    checkInfo(for: scope, model: model)
+                }
+                self.logger.log("••Got new balances, will redraw")
+                balances = reloaded         // redraw
+            } else {
+                self.logger.log("••Same balances, no redraw")
             }
-            balances = reloaded         // redraw
             return reloaded.count
         }
         return nil

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]