gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-android] branch master updated (dced416 -> 5d0b4a4)


From: gnunet
Subject: [taler-taler-android] branch master updated (dced416 -> 5d0b4a4)
Date: Wed, 28 Feb 2024 18:29:28 +0100

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

torsten-grote pushed a change to branch master
in repository taler-android.

    from dced416  [wallet] release 0.9.4+p1
     new 3c36cc3  [wallet] Fix issue where invalid withdraw:// URIs could crash 
the app
     new 5d0b4a4      [wallet] Fix background thread access to loadBalances

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 wallet/src/main/java/net/taler/wallet/balances/BalanceManager.kt  | 8 +++-----
 wallet/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt | 3 +--
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/wallet/src/main/java/net/taler/wallet/balances/BalanceManager.kt 
b/wallet/src/main/java/net/taler/wallet/balances/BalanceManager.kt
index 3321cd1..e964881 100644
--- a/wallet/src/main/java/net/taler/wallet/balances/BalanceManager.kt
+++ b/wallet/src/main/java/net/taler/wallet/balances/BalanceManager.kt
@@ -17,7 +17,6 @@
 package net.taler.wallet.balances
 
 import android.util.Log
-import androidx.annotation.UiThread
 import androidx.lifecycle.LiveData
 import androidx.lifecycle.MutableLiveData
 import androidx.lifecycle.distinctUntilChanged
@@ -55,17 +54,16 @@ class BalanceManager(
 
     val balancesOrNull get() = (state.value as? BalanceState.Success)?.balances
 
-    @UiThread
     fun loadBalances() {
-        mState.value = BalanceState.Loading
+        mState.postValue(BalanceState.Loading)
         scope.launch {
             val response = api.request("getBalances", 
BalanceResponse.serializer())
             response.onError {
                 Log.e(TAG, "Error retrieving balances: $it")
-                mState.value = BalanceState.Error(it)
+                mState.postValue(BalanceState.Error(it))
             }
             response.onSuccess {
-                mState.value = BalanceState.Success(it.balances)
+                mState.postValue(BalanceState.Success(it.balances))
             }
         }
     }
diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt 
b/wallet/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt
index 6e8eafd..231091f 100644
--- a/wallet/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt
+++ b/wallet/src/main/java/net/taler/wallet/withdraw/WithdrawManager.kt
@@ -326,10 +326,9 @@ class WithdrawManager(
         }
     }
 
-    @UiThread
     private fun handleError(operation: String, error: TalerErrorInfo) {
         Log.e(TAG, "Error $operation $error")
-        withdrawStatus.value = WithdrawStatus.Error(error.userFacingMsg)
+        withdrawStatus.postValue(WithdrawStatus.Error(error.userFacingMsg))
     }
 
     /**

-- 
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]