Individual monoforum shared media

(cherry picked from commit b335bb83df)
This commit is contained in:
Isaac
2025-07-08 15:58:43 +04:00
parent 735b497a23
commit 20a85a4ff7
6 changed files with 81 additions and 21 deletions

View File

@@ -3954,6 +3954,7 @@ private func peerInfoControllerImpl(context: AccountContext, updatedPresentation
var callMessages: [Message] = []
var hintGroupInCommon: PeerId?
var forumTopicThread: ChatReplyThreadMessage?
var sharedMediaFromForumTopic: (EnginePeer.Id, Int64)?
var isMyProfile = false
var switchToGifts = false
var switchToGroupsInCommon = false
@@ -3980,10 +3981,12 @@ private func peerInfoControllerImpl(context: AccountContext, updatedPresentation
switchToGifts = true
case .groupsInCommon:
switchToGroupsInCommon = true
case let .monoforum(peerId):
sharedMediaFromForumTopic = (peerId, peer.id.toInt64())
default:
break
}
return PeerInfoScreenImpl(context: context, updatedPresentationData: updatedPresentationData, peerId: peer.id, avatarInitiallyExpanded: avatarInitiallyExpanded, isOpenedFromChat: isOpenedFromChat, nearbyPeerDistance: nearbyPeerDistance, reactionSourceMessageId: reactionSourceMessageId, callMessages: callMessages, isMyProfile: isMyProfile, hintGroupInCommon: hintGroupInCommon, forumTopicThread: forumTopicThread, switchToGifts: switchToGifts, switchToGroupsInCommon: switchToGroupsInCommon)
return PeerInfoScreenImpl(context: context, updatedPresentationData: updatedPresentationData, peerId: peer.id, avatarInitiallyExpanded: avatarInitiallyExpanded, isOpenedFromChat: isOpenedFromChat, nearbyPeerDistance: nearbyPeerDistance, reactionSourceMessageId: reactionSourceMessageId, callMessages: callMessages, isMyProfile: isMyProfile, hintGroupInCommon: hintGroupInCommon, forumTopicThread: forumTopicThread, sharedMediaFromForumTopic: sharedMediaFromForumTopic, switchToGifts: switchToGifts, switchToGroupsInCommon: switchToGroupsInCommon)
} else if peer is TelegramSecretChat {
return PeerInfoScreenImpl(context: context, updatedPresentationData: updatedPresentationData, peerId: peer.id, avatarInitiallyExpanded: avatarInitiallyExpanded, isOpenedFromChat: isOpenedFromChat, nearbyPeerDistance: nil, reactionSourceMessageId: nil, callMessages: [])
}