mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Don't display the only group in common if opened from the same group
This commit is contained in:
@@ -1259,6 +1259,7 @@ private func peerInfoControllerImpl(context: AccountContext, peer: Peer, mode: P
|
||||
} else if peer is TelegramUser {
|
||||
var nearbyPeer = false
|
||||
var callMessages: [Message] = []
|
||||
var ignoreGroupInCommon: PeerId?
|
||||
switch mode {
|
||||
case .nearbyPeer:
|
||||
nearbyPeer = true
|
||||
@@ -1266,8 +1267,10 @@ private func peerInfoControllerImpl(context: AccountContext, peer: Peer, mode: P
|
||||
callMessages = messages
|
||||
case .generic:
|
||||
break
|
||||
case let .group(id):
|
||||
ignoreGroupInCommon = id
|
||||
}
|
||||
return PeerInfoScreen(context: context, peerId: peer.id, avatarInitiallyExpanded: avatarInitiallyExpanded, isOpenedFromChat: isOpenedFromChat, nearbyPeer: nearbyPeer, callMessages: callMessages)
|
||||
return PeerInfoScreen(context: context, peerId: peer.id, avatarInitiallyExpanded: avatarInitiallyExpanded, isOpenedFromChat: isOpenedFromChat, nearbyPeer: nearbyPeer, callMessages: callMessages, ignoreGroupInCommon: ignoreGroupInCommon)
|
||||
} else if peer is TelegramSecretChat {
|
||||
return PeerInfoScreen(context: context, peerId: peer.id, avatarInitiallyExpanded: avatarInitiallyExpanded, isOpenedFromChat: isOpenedFromChat, nearbyPeer: false, callMessages: [])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user