only update if we still have a wallet

This commit is contained in:
m2049r 2020-09-18 09:49:48 +02:00 committed by m2049r
parent 454f3e412a
commit 1697da55b5
1 changed files with 4 additions and 7 deletions

View File

@ -149,11 +149,9 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
getSupportFragmentManager().findFragmentByTag(WalletFragment.class.getName());
if (walletFragment != null) walletFragment.resetDismissedTransactions();
forceUpdate();
runOnUiThread(new Runnable() {
@Override
public void run() {
runOnUiThread(() -> {
if (getWallet() != null)
updateAccountsBalance();
}
});
}
@ -577,10 +575,9 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
@Override
public boolean onRefreshed(final Wallet wallet, final boolean full) {
Timber.d("onRefreshed()");
runOnUiThread(new Runnable() {
public void run() {
runOnUiThread(() -> {
if (getWallet() != null)
updateAccountsBalance();
}
});
if (numAccounts != wallet.getNumAccounts()) {
numAccounts = wallet.getNumAccounts();