Change block chain sync timeout behaviour

This commit is contained in:
Manfred Karrer 2015-05-04 23:38:47 +02:00
parent 16592cd20a
commit b168833182

View file

@ -352,11 +352,13 @@ class MainViewModel implements ViewModel {
private void setBitcoinNetworkSyncProgress(double value) { private void setBitcoinNetworkSyncProgress(double value) {
blockchainSyncProgress.set(value); blockchainSyncProgress.set(value);
if (value >= 1) { if (value >= 1) {
stopBlockchainSyncTimeout();
blockchainSyncInfo.set("Blockchain synchronization complete."); blockchainSyncInfo.set("Blockchain synchronization complete.");
blockchainSyncIconId.set("image-connection-synced"); blockchainSyncIconId.set("image-connection-synced");
} }
else if (value > 0.0) { else if (value > 0.0) {
// We stop as soon the download started the timeout
stopBlockchainSyncTimeout();
blockchainSyncInfo.set("Synchronizing blockchain: " + formatter.formatToPercent(value)); blockchainSyncInfo.set("Synchronizing blockchain: " + formatter.formatToPercent(value));
blockchainSyncInfoFooter.set("Synchronizing: " + formatter.formatToPercent(value)); blockchainSyncInfoFooter.set("Synchronizing: " + formatter.formatToPercent(value));
} }