client: always show yourself as 'conneted' to avoid confusion

pull/153/head
Jake McGinty 2021-09-14 22:49:00 +09:00
parent dcdaefd1ff
commit b179a62a22
1 changed files with 4 additions and 2 deletions

View File

@ -1009,17 +1009,19 @@ fn print_peer(peer: &PeerState, short: bool, level: usize) {
.map(|info| info.is_recently_connected()) .map(|info| info.is_recently_connected())
.unwrap_or_default(); .unwrap_or_default();
let is_you = info.is_none();
println_pad!( println_pad!(
pad, pad,
"| {} {}: {} ({}{}…)", "| {} {}: {} ({}{}…)",
if connected { if connected || is_you {
"".bold() "".bold()
} else { } else {
"".dimmed() "".dimmed()
}, },
peer.ip.to_string().yellow().bold(), peer.ip.to_string().yellow().bold(),
peer.name.yellow(), peer.name.yellow(),
if info.is_none() { "you, " } else { "" }, if is_you { "you, " } else { "" },
&peer.public_key[..6].dimmed(), &peer.public_key[..6].dimmed(),
); );
} else { } else {