mirror of
https://codeberg.org/anoncontributorxmr/mysu.git
synced 2024-11-25 08:52:28 +00:00
Fix bug where updating would stop once coins were sent
This commit is contained in:
parent
693b342393
commit
9187b9d8a4
2 changed files with 10 additions and 6 deletions
|
@ -349,7 +349,9 @@ public class Wallet {
|
|||
}
|
||||
|
||||
public void refreshCoins() {
|
||||
getCoins().refresh();
|
||||
if(this.isSynchronized()) {
|
||||
getCoins().refresh();
|
||||
}
|
||||
}
|
||||
|
||||
private native long setListenerJ(WalletListener listener);
|
||||
|
|
|
@ -86,13 +86,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
|
||||
|
@ -109,15 +109,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();
|
||||
wallet.refreshCoins();
|
||||
if(refreshCoins) {
|
||||
wallet.refreshCoins();
|
||||
}
|
||||
listener.onRefresh();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue