mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 17:45:19 +00:00
Implement proper room leave notifications and improve UI
- Send leave notifications when users exit rooms - Update room member lists when peers leave rooms - Change current user icon from dot to person.fill - Handle room-specific leave messages via protocol - Maintain backwards compatibility for general peer disconnection
This commit is contained in:
@@ -155,6 +155,7 @@ protocol BitchatDelegate: AnyObject {
|
||||
func didConnectToPeer(_ peerID: String)
|
||||
func didDisconnectFromPeer(_ peerID: String)
|
||||
func didUpdatePeerList(_ peers: [String])
|
||||
func didReceiveRoomLeave(_ room: String, from peerID: String)
|
||||
|
||||
// Optional method to check if a fingerprint belongs to a favorite peer
|
||||
func isFavorite(fingerprint: String) -> Bool
|
||||
@@ -165,4 +166,8 @@ extension BitchatDelegate {
|
||||
func isFavorite(fingerprint: String) -> Bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func didReceiveRoomLeave(_ room: String, from peerID: String) {
|
||||
// Default empty implementation
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user