Various improvements

This commit is contained in:
Ilya Laktyushin
2025-01-27 23:44:07 +04:00
parent 6bf08c72ad
commit 10ac25e1cb
42 changed files with 1966 additions and 1095 deletions

View File

@@ -4339,7 +4339,22 @@ extension ChatControllerImpl {
let _ = ApplicationSpecificNotice.incrementDismissedPremiumGiftSuggestion(accountManager: self.context.sharedContext.accountManager, peerId: peerId, timestamp: Int32(Date().timeIntervalSince1970)).startStandalone()
}
} else {
let controller = self.context.sharedContext.makeGiftOptionsController(context: self.context, peerId: peerId, premiumOptions: [], hasBirthday: false, completion: nil)
let controller = self.context.sharedContext.makeGiftOptionsController(context: self.context, peerId: peerId, premiumOptions: [], hasBirthday: false, completion: { [weak self] in
guard let self, let peer = self.presentationInterfaceState.renderedPeer?.peer else {
return
}
if let controller = self.context.sharedContext.makePeerInfoController(
context: self.context,
updatedPresentationData: nil,
peer: peer,
mode: .gifts,
avatarInitiallyExpanded: false,
fromChat: false,
requestsContext: nil
) {
self.push(controller)
}
})
self.push(controller)
}
}, openPremiumRequiredForMessaging: { [weak self] in