mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 00:25:19 +00:00
UI: use 'point.3.connected.trianglepath.dotted' for mesh-reachable; change people count to include connected+reachable (exclude Nostr-only)
This commit is contained in:
@@ -1036,9 +1036,8 @@ struct ContentView: View {
|
||||
case .mesh:
|
||||
let counts = viewModel.allPeers.reduce(into: (others: 0, mesh: 0)) { counts, peer in
|
||||
guard peer.id != viewModel.meshService.myPeerID else { return }
|
||||
let isMeshConnected = peer.isConnected
|
||||
if isMeshConnected { counts.mesh += 1; counts.others += 1 }
|
||||
else if peer.isMutualFavorite { counts.others += 1 }
|
||||
if peer.isConnected { counts.mesh += 1; counts.others += 1 }
|
||||
else if peer.isReachable { counts.others += 1 }
|
||||
}
|
||||
let meshBlue = Color(hue: 0.60, saturation: 0.85, brightness: 0.82)
|
||||
let color: Color = counts.mesh > 0 ? meshBlue : Color.secondary
|
||||
@@ -1248,8 +1247,8 @@ struct ContentView: View {
|
||||
.foregroundColor(textColor)
|
||||
.accessibilityLabel("Connected via mesh")
|
||||
case .meshReachable:
|
||||
// Antenna icon for reachable via mesh (not directly connected)
|
||||
Image(systemName: "antenna.radiowaves.left.and.right")
|
||||
// point.3 icon for reachable via mesh (not directly connected)
|
||||
Image(systemName: "point.3.connected.trianglepath.dotted")
|
||||
.font(.system(size: 14))
|
||||
.foregroundColor(textColor)
|
||||
.accessibilityLabel("Reachable via mesh")
|
||||
|
||||
@@ -52,6 +52,11 @@ struct MeshPeerList: View {
|
||||
Image(systemName: "antenna.radiowaves.left.and.right")
|
||||
.font(.system(size: 10))
|
||||
.foregroundColor(baseColor)
|
||||
} else if peer.isReachable {
|
||||
// Mesh-reachable (relayed): point.3 icon
|
||||
Image(systemName: "point.3.connected.trianglepath.dotted")
|
||||
.font(.system(size: 10))
|
||||
.foregroundColor(baseColor)
|
||||
} else if peer.isMutualFavorite {
|
||||
// Mutual favorite reachable via Nostr: globe icon (purple)
|
||||
Image(systemName: "globe")
|
||||
|
||||
Reference in New Issue
Block a user