Don't display the only group in common if opened from the same group

This commit is contained in:
Ali
2020-03-01 23:39:32 +04:00
parent 171f4a76e9
commit 9fb963e3a6
5 changed files with 34 additions and 17 deletions

View File

@@ -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: [])
}