Merge pull request #2424 from ManfredKarrer/fix-spv-restore-issue

Fix incorrect progress listener for spv file resync
This commit is contained in:
Christoph Atteneder 2019-02-16 16:53:03 +01:00 committed by GitHub
commit 9edd4cfe68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -466,7 +466,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
btcSyncIndicator = new JFXProgressBar();
btcSyncIndicator.setPrefWidth(305);
btcSyncIndicator.progressProperty().bind(model.getBtcSyncProgress());
btcSyncIndicator.progressProperty().bind(model.getCombinedSyncProgress());
ImageView btcSyncIcon = new ImageView();
btcSyncIcon.setVisible(false);
@ -606,7 +606,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
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) {
@ -623,7 +623,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
}
});
model.getBtcSyncProgress().addListener((ov, oldValue, newValue) -> {
model.getCombinedSyncProgress().addListener((ov, oldValue, newValue) -> {
if ((double) newValue >= 1) {
blockchainSyncIndicator.setVisible(false);
blockchainSyncIndicator.setManaged(false);

View File

@ -423,10 +423,10 @@ public class MainViewModel implements ViewModel, BisqSetup.BisqSetupCompleteList
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);
});
@ -525,7 +525,7 @@ public class MainViewModel implements ViewModel, BisqSetup.BisqSetupCompleteList
return combinedInfo;
}
DoubleProperty getBtcSyncProgress() {
DoubleProperty getCombinedSyncProgress() {
return combinedSyncProgress;
}