UI: unread envelope uses orange; hasUnreadMessages checks Nostr conv key for peers with known Nostr pubkeys (geohash DM consistency)

This commit is contained in:
jack
2025-08-26 13:21:13 +02:00
parent ae2b247834
commit b919b3ff0a
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -935,6 +935,13 @@ class ChatViewModel: ObservableObject, BitchatDelegate {
if unreadPrivateMessages.contains(noiseKeyHex) { if unreadPrivateMessages.contains(noiseKeyHex) {
return true return true
} }
// Also check for geohash (Nostr) DM conv key if this peer has a known Nostr pubkey
if let nostrHex = peer.nostrPublicKey {
let convKey = "nostr_" + String(nostrHex.prefix(TransportConfig.nostrConvKeyPrefixLength))
if unreadPrivateMessages.contains(convKey) {
return true
}
}
} }
// Get the peer's nickname to check for temporary Nostr peer IDs // Get the peer's nickname to check for temporary Nostr peer IDs
+1 -1
View File
@@ -119,7 +119,7 @@ struct MeshPeerList: View {
if !isMe, item.hasUnread { if !isMe, item.hasUnread {
Image(systemName: "envelope.fill") Image(systemName: "envelope.fill")
.font(.system(size: 10)) .font(.system(size: 10))
.foregroundColor(.yellow) .foregroundColor(.orange)
.help("New messages") .help("New messages")
} }