Peer list: real-time icon updates by publishing snapshots on connectivity checks; add unread message indicator (envelope) next to peers with unread DMs

This commit is contained in:
jack
2025-08-26 13:15:22 +02:00
parent c6ed3cd665
commit ae2b247834
2 changed files with 10 additions and 0 deletions
+2
View File
@@ -2041,6 +2041,8 @@ final class BLEService: NSObject {
for peerID in disconnectedPeers {
self.delegate?.didDisconnectFromPeer(peerID)
}
// Publish snapshots so UnifiedPeerService updates connection/reachability icons
self.publishFullPeerData()
self.delegate?.didUpdatePeerList(currentPeerIDs)
}
}
+8
View File
@@ -115,6 +115,14 @@ struct MeshPeerList: View {
Spacer()
// Unread message indicator for this peer
if !isMe, item.hasUnread {
Image(systemName: "envelope.fill")
.font(.system(size: 10))
.foregroundColor(.yellow)
.help("New messages")
}
if !isMe {
Button(action: { onToggleFavorite(peer.id) }) {
Image(systemName: (peer.favoriteStatus?.isFavorite ?? false) ? "star.fill" : "star")