Fix syncing issue upon send

This commit is contained in:
pokkst 2023-02-01 20:59:01 -06:00
parent a147faef70
commit 8daa08bd6b
No known key found for this signature in database
GPG Key ID: 90C2ED85E67A50FF

View File

@ -92,13 +92,13 @@ public class MoneroHandlerThread extends Thread implements WalletListener {
@Override
public void newBlock(long height) {
refresh();
refresh(false);
BlockchainService.getInstance().setDaemonHeight(wallet.isSynchronized() ? height : 0);
}
@Override
public void updated() {
refresh();
refresh(false);
}
@Override
@ -115,15 +115,17 @@ public class MoneroHandlerThread extends Thread implements WalletListener {
BlockchainService.getInstance().setDaemonHeight(wallet.getDaemonBlockChainHeight());
wallet.setSynchronized();
wallet.store();
refresh();
refresh(true);
}
BlockchainService.getInstance().setConnectionStatus(status);
}
private void refresh() {
private void refresh(boolean refreshCoins) {
wallet.refreshHistory();
if(refreshCoins) {
wallet.refreshCoins();
}
listener.onRefresh();
}