commit 945620bf15b4c7007b4bf1a63d07578a2283bcf5
parent 18a8322c2cc7d2fcee712f29095b4db28098550e
Author: Iván Ávalos <avalos@disroot.org>
Date: Tue, 19 Mar 2024 09:16:35 -0600
[wallet] Fix call to loadBalances() from non-UI thread
(cherry picked from commit 16946535145f9115c53c84c73ba7d9c076cbc591)
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wallet/src/main/java/net/taler/wallet/MainViewModel.kt b/wallet/src/main/java/net/taler/wallet/MainViewModel.kt
@@ -100,7 +100,7 @@ class MainViewModel(
Log.i(TAG, "Received notification from wallet-core: $payload")
// Only update balances when we're told they changed
- if (payload.type == "balance-change") {
+ if (payload.type == "balance-change") viewModelScope.launch(Dispatchers.Main) {
balanceManager.loadBalances()
}