Skip to content

Commit

Permalink
Merge pull request #2424 from ManfredKarrer/fix-spv-restore-issue
Browse files Browse the repository at this point in the history
Fix incorrect progress listener for spv file resync
  • Loading branch information
ripcurlx authored Feb 16, 2019
2 parents 7738b91 + 7bdd15b commit 9edd4cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions desktop/src/main/java/bisq/desktop/main/MainView.java
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ private VBox createSplashScreen() {

btcSyncIndicator = new JFXProgressBar();
btcSyncIndicator.setPrefWidth(305);
btcSyncIndicator.progressProperty().bind(model.getBtcSyncProgress());
btcSyncIndicator.progressProperty().bind(model.getCombinedSyncProgress());

ImageView btcSyncIcon = new ImageView();
btcSyncIcon.setVisible(false);
Expand Down Expand Up @@ -606,7 +606,7 @@ private AnchorPane createFooter() {
ProgressBar blockchainSyncIndicator = new JFXProgressBar(-1);
blockchainSyncIndicator.setPrefWidth(80);
blockchainSyncIndicator.setMaxHeight(10);
blockchainSyncIndicator.progressProperty().bind(model.getBtcSyncProgress());
blockchainSyncIndicator.progressProperty().bind(model.getCombinedSyncProgress());

model.getWalletServiceErrorMsg().addListener((ov, oldValue, newValue) -> {
if (newValue != null) {
Expand All @@ -623,7 +623,7 @@ private AnchorPane createFooter() {
}
});

model.getBtcSyncProgress().addListener((ov, oldValue, newValue) -> {
model.getCombinedSyncProgress().addListener((ov, oldValue, newValue) -> {
if ((double) newValue >= 1) {
blockchainSyncIndicator.setVisible(false);
blockchainSyncIndicator.setManaged(false);
Expand Down
6 changes: 3 additions & 3 deletions desktop/src/main/java/bisq/desktop/main/MainViewModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,10 @@ private void setupBtcNumPeersWatcher() {
private void showFirstPopupIfResyncSPVRequested() {
Popup firstPopup = new Popup<>();
firstPopup.information(Res.get("settings.net.reSyncSPVAfterRestart")).show();
if (getBtcSyncProgress().get() == 1) {
if (bisqSetup.getBtcSyncProgress().get() == 1) {
showSecondPopupIfResyncSPVRequested(firstPopup);
} else {
getBtcSyncProgress().addListener((observable, oldValue, newValue) -> {
bisqSetup.getBtcSyncProgress().addListener((observable, oldValue, newValue) -> {
if ((double) newValue == 1)
showSecondPopupIfResyncSPVRequested(firstPopup);
});
Expand Down Expand Up @@ -525,7 +525,7 @@ StringProperty getBtcInfo() {
return combinedInfo;
}

DoubleProperty getBtcSyncProgress() {
DoubleProperty getCombinedSyncProgress() {
return combinedSyncProgress;
}

Expand Down

0 comments on commit 9edd4cf

Please sign in to comment.