mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Gift store animations
This commit is contained in:
@@ -528,9 +528,22 @@ public final class WebAppMessagePreviewScreen: ViewControllerComponentContainer
|
||||
}
|
||||
|
||||
fileprivate func proceed() {
|
||||
let requestPeerType = self.preparedMessage.peerTypes.requestPeerTypes
|
||||
let peerTypes = self.preparedMessage.peerTypes
|
||||
var types: [ReplyMarkupButtonRequestPeerType] = []
|
||||
if peerTypes.contains(.users) {
|
||||
types.append(.user(.init(isBot: false, isPremium: nil)))
|
||||
}
|
||||
if peerTypes.contains(.bots) {
|
||||
types.append(.user(.init(isBot: true, isPremium: nil)))
|
||||
}
|
||||
if peerTypes.contains(.channels) {
|
||||
types.append(.channel(.init(isCreator: false, hasUsername: nil, userAdminRights: TelegramChatAdminRights(rights: [.canPostMessages]), botAdminRights: nil)))
|
||||
}
|
||||
if peerTypes.contains(.groups) {
|
||||
types.append(.group(.init(isCreator: false, hasUsername: nil, isForum: nil, botParticipant: false, userAdminRights: nil, botAdminRights: nil)))
|
||||
}
|
||||
|
||||
let controller = self.context.sharedContext.makePeerSelectionController(PeerSelectionControllerParams(context: self.context, filter: [.excludeRecent, .doNotSearchMessages], requestPeerType: requestPeerType, hasContactSelector: false, multipleSelection: true, selectForumThreads: true, immediatelyActivateMultipleSelection: true))
|
||||
let controller = self.context.sharedContext.makePeerSelectionController(PeerSelectionControllerParams(context: self.context, filter: [.excludeRecent, .doNotSearchMessages], requestPeerType: types, hasContactSelector: false, multipleSelection: true, selectForumThreads: true, immediatelyActivateMultipleSelection: true))
|
||||
|
||||
controller.multiplePeersSelected = { [weak self, weak controller] peers, _, _, _, _, _ in
|
||||
guard let self else {
|
||||
|
||||
Reference in New Issue
Block a user