From 17fa8a424a2fad47d75fdd52c3c139adb8698153 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 23 Jan 2016 14:18:27 +0100 Subject: [PATCH] change text when losing internet connection --- .../java/io/bitsquare/gui/main/MainViewModel.java | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java b/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java index f90236ab17..c3b336e540 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java +++ b/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java @@ -266,7 +266,8 @@ public class MainViewModel implements ViewModel { numberofBtcPeersTimer.cancel(); numberofBtcPeersTimer = UserThread.runAfter(() -> { if (walletService.numPeersProperty().get() == 0) - walletServiceErrorMsg.set("You lost the connection to all bitcoin peers."); + walletServiceErrorMsg.set("You lost the connection to all bitcoin network peers.\n" + + "Maybe you lost your internet connection or your computer was in hibernate/sleep mode."); else walletServiceErrorMsg.set(null); }, 2); @@ -393,7 +394,7 @@ public class MainViewModel implements ViewModel { numberofP2PNetworkPeersTimer = UserThread.runAfter(() -> { if (p2PService.getNumAuthenticatedPeers().get() == 0) { p2PNetworkWarnMsg.set("You lost the connection to all P2P network peers.\n" + - "Please check your internet connection or try to restart the application."); + "Maybe you lost your internet connection or your computer was in hibernate/sleep mode."); p2PNetworkLabelId.set("splash-error-state-msg"); } else { p2PNetworkWarnMsg.set(null); @@ -405,16 +406,6 @@ public class MainViewModel implements ViewModel { p2PNetworkLabelId.set("footer-pane"); } - - if ((int) oldValue > 0 && (int) newValue == 0) { - p2PNetworkWarnMsg.set("You lost the connection to all P2P network peers.\n" + - "Please check your internet connection or try to restart the application."); - p2PNetworkLabelId.set("splash-error-state-msg"); - } else if ((int) oldValue == 0 && (int) newValue > 0) { - p2PNetworkWarnMsg.set(null); - p2PNetworkLabelId.set("footer-pane"); - } - updateP2pNetworkInfoWithPeersChanged((int) newValue); }; p2PService.getNumAuthenticatedPeers().addListener(numAuthenticatedPeersListener);