mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 02:12:00 +01:00
change text when losing internet connection
This commit is contained in:
parent
5a1fa6ea4b
commit
17fa8a424a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user