mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 21:25:19 +00:00
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:
@@ -3421,6 +3421,14 @@ extension BluetoothMeshService: CBPeripheralManagerDelegate {
|
||||
|
||||
// Send any cached store-and-forward messages
|
||||
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 {
|
||||
// Session already established, ignore handshake
|
||||
|
||||
Reference in New Issue
Block a user