@@ -2903,7 +2903,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, PeerInfoScreenNodePro
29032903 }
29042904 private var didSetReady = false
29052905
2906- init(controller: PeerInfoScreenImpl, context: AccountContext, peerId: PeerId, avatarInitiallyExpanded: Bool, isOpenedFromChat: Bool, nearbyPeerDistance: Int32?, reactionSourceMessageId: MessageId?, callMessages: [Message], isSettings: Bool, isMyProfile: Bool, hintGroupInCommon: PeerId?, requestsContext: PeerInvitationImportersContext?, starsContext: StarsContext?, chatLocation: ChatLocation, chatLocationContextHolder: Atomic<ChatLocationContextHolder?>, initialPaneKey: PeerInfoPaneKey?) {
2906+ init(controller: PeerInfoScreenImpl, context: AccountContext, peerId: PeerId, avatarInitiallyExpanded: Bool, isOpenedFromChat: Bool, nearbyPeerDistance: Int32?, reactionSourceMessageId: MessageId?, callMessages: [Message], isSettings: Bool, isMyProfile: Bool, hintGroupInCommon: PeerId?, requestsContext: PeerInvitationImportersContext?, profileGiftsContext: ProfileGiftsContext?, starsContext: StarsContext?, chatLocation: ChatLocation, chatLocationContextHolder: Atomic<ChatLocationContextHolder?>, initialPaneKey: PeerInfoPaneKey?) {
29072907 self.controller = controller
29082908 self.context = context
29092909 self.peerId = peerId
@@ -4649,7 +4649,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, PeerInfoScreenNodePro
46494649 self.privacySettings.set(.single(nil))
46504650 }
46514651
4652- screenData = peerInfoScreenData(context: context, peerId: peerId, strings: self.presentationData.strings, dateTimeFormat: self.presentationData.dateTimeFormat, isSettings: self.isSettings, isMyProfile: self.isMyProfile, hintGroupInCommon: hintGroupInCommon, existingRequestsContext: requestsContext, chatLocation: self.chatLocation, chatLocationContextHolder: self.chatLocationContextHolder, privacySettings: self.privacySettings.get(), forceHasGifts: initialPaneKey == .gifts)
4652+ screenData = peerInfoScreenData(context: context, peerId: peerId, strings: self.presentationData.strings, dateTimeFormat: self.presentationData.dateTimeFormat, isSettings: self.isSettings, isMyProfile: self.isMyProfile, hintGroupInCommon: hintGroupInCommon, existingRequestsContext: requestsContext, existingProfileGiftsContext: profileGiftsContext, chatLocation: self.chatLocation, chatLocationContextHolder: self.chatLocationContextHolder, privacySettings: self.privacySettings.get(), forceHasGifts: initialPaneKey == .gifts)
46534653
46544654 var previousTimestamp: Double?
46554655 self.headerNode.displayPremiumIntro = { [weak self] sourceView, peerStatus, emojiStatusFileAndPack, white in
@@ -10183,7 +10183,8 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, PeerInfoScreenNodePro
1018310183 nearbyPeerDistance: nil,
1018410184 reactionSourceMessageId: nil,
1018510185 callMessages: [],
10186- isMyProfile: true
10186+ isMyProfile: true,
10187+ profileGiftsContext: self.data?.profileGiftsContext
1018710188 ))
1018810189 case .stories:
1018910190 push(PeerInfoStoryGridScreen(context: self.context, peerId: self.context.account.peerId, scope: .saved))
@@ -12592,6 +12593,7 @@ public final class PeerInfoScreenImpl: ViewController, PeerInfoScreen, KeyShortc
1259212593 let isMyProfile: Bool
1259312594 private let hintGroupInCommon: PeerId?
1259412595 private weak var requestsContext: PeerInvitationImportersContext?
12596+ private weak var profileGiftsContext: ProfileGiftsContext?
1259512597 fileprivate let starsContext: StarsContext?
1259612598 private let switchToRecommendedChannels: Bool
1259712599 private let switchToGifts: Bool
@@ -12652,7 +12654,25 @@ public final class PeerInfoScreenImpl: ViewController, PeerInfoScreen, KeyShortc
1265212654
1265312655 private var validLayout: (layout: ContainerViewLayout, navigationHeight: CGFloat)?
1265412656
12655- public init(context: AccountContext, updatedPresentationData: (initial: PresentationData, signal: Signal<PresentationData, NoError>)?, peerId: PeerId, avatarInitiallyExpanded: Bool, isOpenedFromChat: Bool, nearbyPeerDistance: Int32?, reactionSourceMessageId: MessageId?, callMessages: [Message], isSettings: Bool = false, isMyProfile: Bool = false, hintGroupInCommon: PeerId? = nil, requestsContext: PeerInvitationImportersContext? = nil, forumTopicThread: ChatReplyThreadMessage? = nil, switchToRecommendedChannels: Bool = false, switchToGifts: Bool = false, switchToGroupsInCommon: Bool = false) {
12657+ public init(
12658+ context: AccountContext,
12659+ updatedPresentationData: (initial: PresentationData, signal: Signal<PresentationData, NoError>)?,
12660+ peerId: PeerId,
12661+ avatarInitiallyExpanded: Bool,
12662+ isOpenedFromChat: Bool,
12663+ nearbyPeerDistance: Int32?,
12664+ reactionSourceMessageId: MessageId?,
12665+ callMessages: [Message],
12666+ isSettings: Bool = false,
12667+ isMyProfile: Bool = false,
12668+ hintGroupInCommon: PeerId? = nil,
12669+ requestsContext: PeerInvitationImportersContext? = nil,
12670+ profileGiftsContext: ProfileGiftsContext? = nil,
12671+ forumTopicThread: ChatReplyThreadMessage? = nil,
12672+ switchToRecommendedChannels: Bool = false,
12673+ switchToGifts: Bool = false,
12674+ switchToGroupsInCommon: Bool = false
12675+ ) {
1265612676 self.context = context
1265712677 self.updatedPresentationData = updatedPresentationData
1265812678 self.peerId = peerId
@@ -12665,6 +12685,7 @@ public final class PeerInfoScreenImpl: ViewController, PeerInfoScreen, KeyShortc
1266512685 self.isMyProfile = isMyProfile
1266612686 self.hintGroupInCommon = hintGroupInCommon
1266712687 self.requestsContext = requestsContext
12688+ self.profileGiftsContext = profileGiftsContext
1266812689 self.switchToRecommendedChannels = switchToRecommendedChannels
1266912690 self.switchToGifts = switchToGifts
1267012691 self.switchToGroupsInCommon = switchToGroupsInCommon
@@ -13016,7 +13037,7 @@ public final class PeerInfoScreenImpl: ViewController, PeerInfoScreen, KeyShortc
1301613037 } else if self.switchToGroupsInCommon {
1301713038 initialPaneKey = .groupsInCommon
1301813039 }
13019- self.displayNode = PeerInfoScreenNode(controller: self, context: self.context, peerId: self.peerId, avatarInitiallyExpanded: self.avatarInitiallyExpanded, isOpenedFromChat: self.isOpenedFromChat, nearbyPeerDistance: self.nearbyPeerDistance, reactionSourceMessageId: self.reactionSourceMessageId, callMessages: self.callMessages, isSettings: self.isSettings, isMyProfile: self.isMyProfile, hintGroupInCommon: self.hintGroupInCommon, requestsContext: self.requestsContext, starsContext: self.starsContext, chatLocation: self.chatLocation, chatLocationContextHolder: self.chatLocationContextHolder, initialPaneKey: initialPaneKey)
13040+ self.displayNode = PeerInfoScreenNode(controller: self, context: self.context, peerId: self.peerId, avatarInitiallyExpanded: self.avatarInitiallyExpanded, isOpenedFromChat: self.isOpenedFromChat, nearbyPeerDistance: self.nearbyPeerDistance, reactionSourceMessageId: self.reactionSourceMessageId, callMessages: self.callMessages, isSettings: self.isSettings, isMyProfile: self.isMyProfile, hintGroupInCommon: self.hintGroupInCommon, requestsContext: self.requestsContext, profileGiftsContext: self.profileGiftsContext, starsContext: self.starsContext, chatLocation: self.chatLocation, chatLocationContextHolder: self.chatLocationContextHolder, initialPaneKey: initialPaneKey)
1302013041 self.controllerNode.accountsAndPeers.set(self.accountsAndPeers.get() |> map { $0.1 })
1302113042 self.controllerNode.activeSessionsContextAndCount.set(self.activeSessionsContextAndCount.get())
1302213043 self.cachedDataPromise.set(self.controllerNode.cachedDataPromise.get())
0 commit comments