Fix BLE advertisement warnings and duplicate registrations

- Remove 'Is Connectable' and 'Manufacturer Data' keys from BLE ads
- Only use allowed keys: service UUIDs and local name
- Prevent duplicate fingerprint registrations in favorites
- Comment out unused fragment type string variable

The warnings about advertisement keys should no longer appear.
This commit is contained in:
jack
2025-07-04 13:33:38 +02:00
parent 1e2717f152
commit 6f85faa6c0
2 changed files with 17 additions and 19 deletions
+7 -2
View File
@@ -110,8 +110,13 @@ class ChatViewModel: ObservableObject {
.prefix(16) // Use first 16 chars for brevity
.lowercased()
peerIDToPublicKeyFingerprint[peerID] = String(fingerprint)
print("[FAVORITES] Registered fingerprint \(fingerprint) for peer \(peerID)")
let fingerprintStr = String(fingerprint)
// Only register if not already registered
if peerIDToPublicKeyFingerprint[peerID] != fingerprintStr {
peerIDToPublicKeyFingerprint[peerID] = fingerprintStr
print("[FAVORITES] Registered fingerprint \(fingerprint) for peer \(peerID)")
}
}
func sendMessage(_ content: String) {