Fix some progress bar issues

This commit is contained in:
pokkst 2022-09-08 12:42:50 -05:00
parent 7109442ad0
commit 967345e1c3
No known key found for this signature in database
GPG key ID: 90C2ED85E67A50FF
2 changed files with 1 additions and 2 deletions

View file

@ -124,7 +124,6 @@ public class HomeFragment extends Fragment implements TransactionInfoAdapter.TxI
int x = 100 - Math.round(100f * n / (1f * daemonHeight - startHeight));
progressBar.setIndeterminate(height <= 1 || daemonHeight <= 0);
if (height > 1 && daemonHeight > 1) {
if (x == 0) x = 101; // indeterminate
progressBar.setProgress(x);
}
} else {

View file

@ -101,13 +101,13 @@ public class MoneroHandlerThread extends Thread implements WalletListener {
} else {
BlockchainService.getInstance().setDaemonHeight(wallet.getDaemonBlockChainHeight());
wallet.setSynchronized();
wallet.store();
refresh();
}
}
private void refresh() {
wallet.refreshHistory();
wallet.store();
listener.onRefresh();
}