only update if we still have a wallet

merge-requests/3/head
wow nero 4 years ago committed by m2049r
parent 454f3e412a
commit 1697da55b5

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

Loading…
Cancel
Save