Fix UI not updating lock icon after handshake completion

The handshake was completing successfully but the UI wasn't being notified to update the encryption status icon. Added a delegate notification after handshake completion to trigger updateEncryptionStatusForPeers() in the UI.

This ensures the lock icon changes from empty to filled when encryption is established.
This commit is contained in:
jack
2025-07-23 10:54:47 +02:00
parent fb35d59dc9
commit 61d267db5e
@@ -3421,6 +3421,14 @@ extension BluetoothMeshService: CBPeripheralManagerDelegate {
// Send any cached store-and-forward messages // Send any cached store-and-forward messages
sendCachedMessages(to: peerID) sendCachedMessages(to: peerID)
// Notify delegate to update UI encryption status
DispatchQueue.main.async { [weak self] in
// Force UI to refresh by sending a peer list update
if let peers = self?.collectionsQueue.sync(execute: { Array(self?.activePeers ?? []) }) {
self?.delegate?.didUpdatePeerList(peers)
}
}
} }
} catch NoiseSessionError.alreadyEstablished { } catch NoiseSessionError.alreadyEstablished {
// Session already established, ignore handshake // Session already established, ignore handshake