From 967345e1c3b88359ec660c6637d94ea2d6ed9a34 Mon Sep 17 00:00:00 2001 From: pokkst Date: Thu, 8 Sep 2022 12:42:50 -0500 Subject: [PATCH] Fix some progress bar issues --- .../java/com/m2049r/xmrwallet/fragment/home/HomeFragment.java | 1 - .../java/com/m2049r/xmrwallet/service/MoneroHandlerThread.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/m2049r/xmrwallet/fragment/home/HomeFragment.java b/app/src/main/java/com/m2049r/xmrwallet/fragment/home/HomeFragment.java index 9647325..831c3f1 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/fragment/home/HomeFragment.java +++ b/app/src/main/java/com/m2049r/xmrwallet/fragment/home/HomeFragment.java @@ -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 { diff --git a/app/src/main/java/com/m2049r/xmrwallet/service/MoneroHandlerThread.java b/app/src/main/java/com/m2049r/xmrwallet/service/MoneroHandlerThread.java index 3b97229..0570530 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/service/MoneroHandlerThread.java +++ b/app/src/main/java/com/m2049r/xmrwallet/service/MoneroHandlerThread.java @@ -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(); }