Fix node display

This commit is contained in:
chimp1984 2021-01-06 01:33:00 -05:00
parent a996754e06
commit 8865d9bc93
No known key found for this signature in database
GPG key ID: 9801B4EC591F90E3

View file

@ -114,11 +114,13 @@ public class P2pNetworkListItem {
ConnectionState connectionState = connection.getConnectionState(); ConnectionState connectionState = connection.getConnectionState();
if (connectionState.getPeerType() == PeerType.DIRECT_MSG_PEER) { if (connectionState.getPeerType() == PeerType.DIRECT_MSG_PEER) {
peerType.set(Res.get("settings.net.directPeer")); peerType.set(Res.get("settings.net.directPeer"));
} else if (connectionState.getPeerType() == PeerType.INITIAL_DATA_EXCHANGE) {
peerType.set(Res.get("settings.net.initialDataExchange",
connectionState.isSeedNode() ? Res.get("settings.net.seedNode") : Res.get("settings.net.peer")));
} else { } else {
peerType.set(Res.get("settings.net.peer")); String peerOrSeed = connectionState.isSeedNode() ? Res.get("settings.net.seedNode") : Res.get("settings.net.peer");
if (connectionState.getPeerType() == PeerType.INITIAL_DATA_EXCHANGE) {
peerType.set(Res.get("settings.net.initialDataExchange", peerOrSeed));
} else {
peerType.set(peerOrSeed);
}
} }
} }