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)); int x = 100 - Math.round(100f * n / (1f * daemonHeight - startHeight));
progressBar.setIndeterminate(height <= 1 || daemonHeight <= 0); progressBar.setIndeterminate(height <= 1 || daemonHeight <= 0);
if (height > 1 && daemonHeight > 1) { if (height > 1 && daemonHeight > 1) {
if (x == 0) x = 101; // indeterminate
progressBar.setProgress(x); progressBar.setProgress(x);
} }
} else { } else {

View File

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