Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect progress listener for spv file resync #2424

Merged
merged 1 commit into from
Feb 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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