Various fixes

This commit is contained in:
Ilya Laktyushin 2023-03-06 18:30:43 +04:00
parent 5ae6a7d142
commit a668ad006d
10 changed files with 97 additions and 33 deletions

View File

@ -826,6 +826,7 @@ public protocol SharedAccountContext: AnyObject {
func makePremiumIntroController(context: AccountContext, source: PremiumIntroSource) -> ViewController func makePremiumIntroController(context: AccountContext, source: PremiumIntroSource) -> ViewController
func makePremiumDemoController(context: AccountContext, subject: PremiumDemoSubject, action: @escaping () -> Void) -> ViewController func makePremiumDemoController(context: AccountContext, subject: PremiumDemoSubject, action: @escaping () -> Void) -> ViewController
func makePremiumLimitController(context: AccountContext, subject: PremiumLimitSubject, count: Int32, action: @escaping () -> Void) -> ViewController
func makeStickerPackScreen(context: AccountContext, updatedPresentationData: (initial: PresentationData, signal: Signal<PresentationData, NoError>)?, mainStickerPack: StickerPackReference, stickerPacks: [StickerPackReference], loadedStickerPacks: [LoadedStickerPack], parentNavigationController: NavigationController?, sendSticker: ((FileMediaReference, UIView, CGRect) -> Bool)?) -> ViewController func makeStickerPackScreen(context: AccountContext, updatedPresentationData: (initial: PresentationData, signal: Signal<PresentationData, NoError>)?, mainStickerPack: StickerPackReference, stickerPacks: [StickerPackReference], loadedStickerPacks: [LoadedStickerPack], parentNavigationController: NavigationController?, sendSticker: ((FileMediaReference, UIView, CGRect) -> Bool)?) -> ViewController
@ -885,6 +886,14 @@ public enum PremiumDemoSubject {
case translation case translation
} }
public enum PremiumLimitSubject {
case folders
case chatsPerFolder
case pins
case files
case accounts
}
public protocol ComposeController: ViewController { public protocol ComposeController: ViewController {
} }

View File

@ -1219,7 +1219,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
guard let strongSelf = self else { guard let strongSelf = self else {
return return
} }
strongSelf.reorderingDonePressed() let _ = strongSelf.reorderingDonePressed()
} }
self.chatListDisplayNode.toolbarActionSelected = { [weak self] action in self.chatListDisplayNode.toolbarActionSelected = { [weak self] action in
@ -2130,16 +2130,12 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
tabContainerOffset += layout.statusBarHeight ?? 0.0 tabContainerOffset += layout.statusBarHeight ?? 0.0
tabContainerOffset += 44.0 + 20.0 tabContainerOffset += 44.0 + 20.0
} }
//tabContainerOffset += self.chatListDisplayNode.inlineStackContainerTransitionFraction * NavigationBar.defaultSecondaryContentHeight
let navigationBarHeight = self.navigationBar?.frame.maxY ?? 0.0 let navigationBarHeight = self.navigationBar?.frame.maxY ?? 0.0
//transition.updateAlpha(node: self.tabContainerNode, alpha: self.chatListDisplayNode.inlineStackContainerTransitionFraction * 0.5 + (1.0 - self.chatListDisplayNode.inlineStackContainerTransitionFraction) * 1.0)
//self.tabContainerNode.isUserInteractionEnabled = self.chatListDisplayNode.inlineStackContainerNode == nil
transition.updateFrame(node: self.tabContainerNode, frame: CGRect(origin: CGPoint(x: 0.0, y: navigationBarHeight - self.additionalNavigationBarHeight - 46.0 + tabContainerOffset), size: CGSize(width: layout.size.width, height: 46.0))) transition.updateFrame(node: self.tabContainerNode, frame: CGRect(origin: CGPoint(x: 0.0, y: navigationBarHeight - self.additionalNavigationBarHeight - 46.0 + tabContainerOffset), size: CGSize(width: layout.size.width, height: 46.0)))
self.tabContainerNode.update(size: CGSize(width: layout.size.width, height: 46.0), sideInset: layout.safeInsets.left, filters: self.tabContainerData?.0 ?? [], selectedFilter: self.chatListDisplayNode.mainContainerNode.currentItemFilter, isReordering: self.chatListDisplayNode.isReorderingFilters || (self.chatListDisplayNode.effectiveContainerNode.currentItemNode.currentState.editing && !self.chatListDisplayNode.didBeginSelectingChatsWhileEditing), isEditing: self.chatListDisplayNode.effectiveContainerNode.currentItemNode.currentState.editing, canReorderAllChats: self.isPremium, filtersLimit: self.tabContainerData?.2, transitionFraction: self.chatListDisplayNode.effectiveContainerNode.transitionFraction, presentationData: self.presentationData, transition: .animated(duration: 0.4, curve: .spring)) if !skipTabContainerUpdate {
self.tabContainerNode.update(size: CGSize(width: layout.size.width, height: 46.0), sideInset: layout.safeInsets.left, filters: self.tabContainerData?.0 ?? [], selectedFilter: self.chatListDisplayNode.mainContainerNode.currentItemFilter, isReordering: self.chatListDisplayNode.isReorderingFilters || (self.chatListDisplayNode.effectiveContainerNode.currentItemNode.currentState.editing && !self.chatListDisplayNode.didBeginSelectingChatsWhileEditing), isEditing: self.chatListDisplayNode.effectiveContainerNode.currentItemNode.currentState.editing, canReorderAllChats: self.isPremium, filtersLimit: self.tabContainerData?.2, transitionFraction: self.chatListDisplayNode.effectiveContainerNode.transitionFraction, presentationData: self.presentationData, transition: .animated(duration: 0.4, curve: .spring))
}
self.chatListDisplayNode.containerLayoutUpdated(layout, navigationBarHeight: self.cleanNavigationHeight, visualNavigationHeight: navigationBarHeight, cleanNavigationBarHeight: self.cleanNavigationHeight, transition: transition) self.chatListDisplayNode.containerLayoutUpdated(layout, navigationBarHeight: self.cleanNavigationHeight, visualNavigationHeight: navigationBarHeight, cleanNavigationBarHeight: self.cleanNavigationHeight, transition: transition)
} }
@ -2186,7 +2182,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
} }
@objc fileprivate func donePressed() { @objc fileprivate func donePressed() {
self.reorderingDonePressed() let skipLayoutUpdate = self.reorderingDonePressed()
(self.navigationController as? NavigationController)?.updateMasterDetailsBlackout(nil, transition: .animated(duration: 0.4, curve: .spring)) (self.navigationController as? NavigationController)?.updateMasterDetailsBlackout(nil, transition: .animated(duration: 0.4, curve: .spring))
self.searchContentNode?.setIsEnabled(true, animated: true) self.searchContentNode?.setIsEnabled(true, animated: true)
@ -2200,15 +2196,20 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
return state return state
} }
self.chatListDisplayNode.isEditing = false self.chatListDisplayNode.isEditing = false
if let layout = self.validLayout {
self.updateLayout(layout: layout, transition: .animated(duration: 0.2, curve: .easeInOut)) if !skipLayoutUpdate {
if let layout = self.validLayout {
self.updateLayout(layout: layout, transition: .animated(duration: 0.2, curve: .easeInOut))
}
} }
} }
@objc fileprivate func reorderingDonePressed() { private var skipTabContainerUpdate = false
fileprivate func reorderingDonePressed() -> Bool {
guard let defaultFilters = self.tabContainerData else { guard let defaultFilters = self.tabContainerData else {
return return false
} }
self.skipTabContainerUpdate = true
let defaultFilterIds = defaultFilters.0.compactMap { entry -> Int32? in let defaultFilterIds = defaultFilters.0.compactMap { entry -> Int32? in
switch entry { switch entry {
case .all: case .all:
@ -2227,6 +2228,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
guard let strongSelf = self else { guard let strongSelf = self else {
return return
} }
strongSelf.skipTabContainerUpdate = false
strongSelf.chatListDisplayNode.isReorderingFilters = false strongSelf.chatListDisplayNode.isReorderingFilters = false
strongSelf.isReorderingTabsValue.set(false) strongSelf.isReorderingTabsValue.set(false)
(strongSelf.parent as? TabBarController)?.updateIsTabBarEnabled(true, transition: .animated(duration: 0.2, curve: .easeInOut)) (strongSelf.parent as? TabBarController)?.updateIsTabBarEnabled(true, transition: .animated(duration: 0.2, curve: .easeInOut))
@ -2263,6 +2265,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
} else { } else {
completion() completion()
} }
return true
} }
public func setInlineChatList(location: ChatListControllerLocation?) { public func setInlineChatList(location: ChatListControllerLocation?) {
@ -4625,7 +4628,7 @@ private final class ChatListLocationContext {
self.leftButton = AnyComponentWithIdentity(id: "done", component: AnyComponent(NavigationButtonComponent( self.leftButton = AnyComponentWithIdentity(id: "done", component: AnyComponent(NavigationButtonComponent(
content: .text(title: presentationData.strings.Common_Done, isBold: true), content: .text(title: presentationData.strings.Common_Done, isBold: true),
pressed: { [weak self] _ in pressed: { [weak self] _ in
self?.parentController?.reorderingDonePressed() let _ = self?.parentController?.reorderingDonePressed()
} }
))) )))
@ -4671,7 +4674,7 @@ private final class ChatListLocationContext {
self.leftButton = AnyComponentWithIdentity(id: "done", component: AnyComponent(NavigationButtonComponent( self.leftButton = AnyComponentWithIdentity(id: "done", component: AnyComponent(NavigationButtonComponent(
content: .text(title: presentationData.strings.Common_Done, isBold: true), content: .text(title: presentationData.strings.Common_Done, isBold: true),
pressed: { [weak self] _ in pressed: { [weak self] _ in
self?.parentController?.reorderingDonePressed() let _ = self?.parentController?.reorderingDonePressed()
} }
))) )))
} else { } else {

View File

@ -696,7 +696,7 @@ public final class ChatListContainerNode: ASDisplayNode, UIGestureRecognizerDele
var activateChatPreview: ((ChatListItem, Int64?, ASDisplayNode, ContextGesture?, CGPoint?) -> Void)? var activateChatPreview: ((ChatListItem, Int64?, ASDisplayNode, ContextGesture?, CGPoint?) -> Void)?
var addedVisibleChatsWithPeerIds: (([EnginePeer.Id]) -> Void)? var addedVisibleChatsWithPeerIds: (([EnginePeer.Id]) -> Void)?
var didBeginSelectingChats: (() -> Void)? var didBeginSelectingChats: (() -> Void)?
var displayFilterLimit: (() -> Void)? public var displayFilterLimit: (() -> Void)?
public init(context: AccountContext, location: ChatListControllerLocation, chatListMode: ChatListNodeMode = .chatList, previewing: Bool, controlsHistoryPreload: Bool, isInlineMode: Bool, presentationData: PresentationData, animationCache: AnimationCache, animationRenderer: MultiAnimationRenderer, filterBecameEmpty: @escaping (ChatListFilter?) -> Void, filterEmptyAction: @escaping (ChatListFilter?) -> Void, secondaryEmptyAction: @escaping () -> Void) { public init(context: AccountContext, location: ChatListControllerLocation, chatListMode: ChatListNodeMode = .chatList, previewing: Bool, controlsHistoryPreload: Bool, isInlineMode: Bool, presentationData: PresentationData, animationCache: AnimationCache, animationRenderer: MultiAnimationRenderer, filterBecameEmpty: @escaping (ChatListFilter?) -> Void, filterEmptyAction: @escaping (ChatListFilter?) -> Void, secondaryEmptyAction: @escaping () -> Void) {
self.context = context self.context = context
@ -814,6 +814,8 @@ public final class ChatListContainerNode: ASDisplayNode, UIGestureRecognizerDele
let translation = recognizer.translation(in: self.view) let translation = recognizer.translation(in: self.view)
var transitionFraction = translation.x / layout.size.width var transitionFraction = translation.x / layout.size.width
var transition: ContainedViewLayoutTransition = .immediate
func rubberBandingOffset(offset: CGFloat, bandingStart: CGFloat) -> CGFloat { func rubberBandingOffset(offset: CGFloat, bandingStart: CGFloat) -> CGFloat {
let bandedOffset = offset - bandingStart let bandedOffset = offset - bandingStart
let range: CGFloat = 600.0 let range: CGFloat = 600.0
@ -832,9 +834,11 @@ public final class ChatListContainerNode: ASDisplayNode, UIGestureRecognizerDele
if let filtersLimit = self.filtersLimit, selectedIndex >= filtersLimit - 1 { if let filtersLimit = self.filtersLimit, selectedIndex >= filtersLimit - 1 {
transitionFraction = 0.0 transitionFraction = 0.0
self.transitionFractionOffset = 0.0
recognizer.isEnabled = false recognizer.isEnabled = false
recognizer.isEnabled = true recognizer.isEnabled = true
transition = .animated(duration: 0.45, curve: .spring)
self.displayFilterLimit?() self.displayFilterLimit?()
} }
} }
@ -848,7 +852,7 @@ public final class ChatListContainerNode: ASDisplayNode, UIGestureRecognizerDele
} }
} }
self.update(layout: layout, navigationBarHeight: navigationBarHeight, visualNavigationHeight: visualNavigationHeight, originalNavigationHeight: originalNavigationHeight, cleanNavigationBarHeight: cleanNavigationBarHeight, insets: insets, isReorderingFilters: isReorderingFilters, isEditing: isEditing, inlineNavigationLocation: inlineNavigationLocation, inlineNavigationTransitionFraction: inlineNavigationTransitionFraction, transition: .immediate) self.update(layout: layout, navigationBarHeight: navigationBarHeight, visualNavigationHeight: visualNavigationHeight, originalNavigationHeight: originalNavigationHeight, cleanNavigationBarHeight: cleanNavigationBarHeight, insets: insets, isReorderingFilters: isReorderingFilters, isEditing: isEditing, inlineNavigationLocation: inlineNavigationLocation, inlineNavigationTransitionFraction: inlineNavigationTransitionFraction, transition: .immediate)
self.currentItemFilterUpdated?(self.currentItemFilter, self.transitionFraction, .immediate, false) self.currentItemFilterUpdated?(self.currentItemFilter, self.transitionFraction, transition, false)
} }
case .cancelled, .ended: case .cancelled, .ended:
if let (layout, navigationBarHeight, visualNavigationHeight, originalNavigationHeight: originalNavigationHeight, cleanNavigationBarHeight, insets, isReorderingFilters, isEditing, inlineNavigationLocation, inlineNavigationTransitionFraction) = self.validLayout, let selectedIndex = self.availableFilters.firstIndex(where: { $0.id == self.selectedId }) { if let (layout, navigationBarHeight, visualNavigationHeight, originalNavigationHeight: originalNavigationHeight, cleanNavigationBarHeight, insets, isReorderingFilters, isEditing, inlineNavigationLocation, inlineNavigationTransitionFraction) = self.validLayout, let selectedIndex = self.availableFilters.firstIndex(where: { $0.id == self.selectedId }) {

View File

@ -501,7 +501,7 @@ public final class ChatListFilterTabContainerNode: ASDisplayNode {
} }
} }
var filtersCount: Int32 { public var filtersCount: Int32 {
if let (_, _, filters, _, _, _, _, _, _, _) = self.currentParams { if let (_, _, filters, _, _, _, _, _, _, _) = self.currentParams {
let filters = filters.filter { filter in let filters = filters.filter { filter in
if case .all = filter { if case .all = filter {

View File

@ -510,7 +510,6 @@ final class ChatListFilterTabInlineContainerNode: ASDisplayNode {
return return
} }
if let reorderingItemNodePair = strongSelf.itemNodePairs[reorderingItem], let (initial, _) = strongSelf.reorderingItemPosition, let reorderedItemIds = strongSelf.reorderedItemIds, let currentItemIndex = reorderedItemIds.firstIndex(of: reorderingItem) { if let reorderingItemNodePair = strongSelf.itemNodePairs[reorderingItem], let (initial, _) = strongSelf.reorderingItemPosition, let reorderedItemIds = strongSelf.reorderedItemIds, let currentItemIndex = reorderedItemIds.firstIndex(of: reorderingItem) {
for (id, itemNodePair) in strongSelf.itemNodePairs { for (id, itemNodePair) in strongSelf.itemNodePairs {
guard let itemIndex = reorderedItemIds.firstIndex(of: id) else { guard let itemIndex = reorderedItemIds.firstIndex(of: id) else {
continue continue

View File

@ -752,12 +752,16 @@ private func channelAdminControllerEntries(presentationData: PresentationData, s
} else { } else {
if case let .user(adminPeer) = adminPeer, adminPeer.botInfo != nil, invite { if case let .user(adminPeer) = adminPeer, adminPeer.botInfo != nil, invite {
if let initialParticipant = initialParticipant, case let .member(_, _, adminRights, _, _) = initialParticipant, adminRights != nil { if let initialParticipant = initialParticipant, case let .member(_, _, adminRights, _, _) = initialParticipant, adminRights != nil {
} else { } else {
entries.append(.adminRights(presentationData.theme, presentationData.strings.Bot_AddToChat_Add_AdminRights, state.adminRights)) entries.append(.adminRights(presentationData.theme, presentationData.strings.Bot_AddToChat_Add_AdminRights, state.adminRights))
} }
} }
var accountIsCreator = false
if case .creator = group.role {
accountIsCreator = true
}
if !invite || state.adminRights { if !invite || state.adminRights {
entries.append(.rightsTitle(presentationData.theme, presentationData.strings.Channel_EditAdmin_PermissionsHeader)) entries.append(.rightsTitle(presentationData.theme, presentationData.strings.Channel_EditAdmin_PermissionsHeader))
@ -785,12 +789,7 @@ private func channelAdminControllerEntries(presentationData: PresentationData, s
} else { } else {
currentRightsFlags = accountUserRightsFlags.subtracting(.canAddAdmins).subtracting(.canBeAnonymous) currentRightsFlags = accountUserRightsFlags.subtracting(.canAddAdmins).subtracting(.canBeAnonymous)
} }
var accountIsCreator = false
if case .creator = group.role {
accountIsCreator = true
}
var index = 0 var index = 0
for right in rightsOrder { for right in rightsOrder {
if accountUserRightsFlags.contains(right) { if accountUserRightsFlags.contains(right) {
@ -813,8 +812,16 @@ private func channelAdminControllerEntries(presentationData: PresentationData, s
entries.append(.rankInfo(presentationData.theme, presentationData.strings.Group_EditAdmin_RankInfo(placeholder).string, invite)) entries.append(.rankInfo(presentationData.theme, presentationData.strings.Group_EditAdmin_RankInfo(placeholder).string, invite))
} }
if let initialParticipant = initialParticipant, case let .member(_, _, adminInfo, _, _) = initialParticipant, admin.id != accountPeerId, adminInfo != nil { if let initialParticipant = initialParticipant, case let .member(_, _, adminInfo, _, _) = initialParticipant, admin.id != accountPeerId, let adminInfo {
entries.append(.dismiss(presentationData.theme, presentationData.strings.Channel_Moderator_AccessLevelRevoke)) var canDismiss = false
if accountIsCreator {
canDismiss = true
} else if adminInfo.promotedBy == accountPeerId || adminInfo.canBeEditedByAccountPeer {
canDismiss = true
}
if canDismiss {
entries.append(.dismiss(presentationData.theme, presentationData.strings.Channel_Moderator_AccessLevelRevoke))
}
} }
} }
} }

View File

@ -1068,8 +1068,8 @@ func availableActionsForMemberOfPeer(accountPeerId: PeerId, peer: Peer?, member:
case .admin: case .admin:
switch member { switch member {
case let .legacyGroupMember(_, _, invitedBy, _): case let .legacyGroupMember(_, _, invitedBy, _):
result.insert(.restrict)
if invitedBy == accountPeerId { if invitedBy == accountPeerId {
result.insert(.restrict)
result.insert(.promote) result.insert(.promote)
} }
case .channelMember: case .channelMember:

View File

@ -175,7 +175,6 @@ public final class PeerSelectionControllerImpl: ViewController, PeerSelectionCon
self._ready.set(.never()) self._ready.set(.never())
self.tabContainerNode = ChatListFilterTabContainerNode() self.tabContainerNode = ChatListFilterTabContainerNode()
self.navigationBar?.setSecondaryContentNode(self.tabContainerNode, animated: false)
self.reloadFilters() self.reloadFilters()
self.peerSelectionNode.mainContainerNode?.currentItemFilterUpdated = { [weak self] filter, fraction, transition, force in self.peerSelectionNode.mainContainerNode?.currentItemFilterUpdated = { [weak self] filter, fraction, transition, force in
@ -194,12 +193,24 @@ public final class PeerSelectionControllerImpl: ViewController, PeerSelectionCon
strongSelf.tabContainerNode?.update(size: CGSize(width: layout.size.width, height: 46.0), sideInset: layout.safeInsets.left, filters: tabContainerData.0, selectedFilter: filter, isReordering: false, isEditing: false, canReorderAllChats: false, filtersLimit: tabContainerData.2, transitionFraction: fraction, presentationData: strongSelf.presentationData, transition: transition) strongSelf.tabContainerNode?.update(size: CGSize(width: layout.size.width, height: 46.0), sideInset: layout.safeInsets.left, filters: tabContainerData.0, selectedFilter: filter, isReordering: false, isEditing: false, canReorderAllChats: false, filtersLimit: tabContainerData.2, transitionFraction: fraction, presentationData: strongSelf.presentationData, transition: transition)
} }
self.tabContainerNode?.tabSelected = { [weak self] id, _ in self.tabContainerNode?.tabSelected = { [weak self] id, isDisabled in
guard let strongSelf = self else { guard let strongSelf = self else {
return return
} }
if isDisabled {
strongSelf.selectTab(id: id) let context = strongSelf.context
var replaceImpl: ((ViewController) -> Void)?
let controller = context.sharedContext.makePremiumLimitController(context: context, subject: .folders, count: strongSelf.tabContainerNode?.filtersCount ?? 0, action: {
let controller = context.sharedContext.makePremiumIntroController(context: context, source: .folders)
replaceImpl?(controller)
})
replaceImpl = { [weak controller] c in
controller?.replace(with: c)
}
strongSelf.push(controller)
} else {
strongSelf.selectTab(id: id)
}
} }
} }
} }

View File

@ -285,6 +285,20 @@ final class PeerSelectionControllerNode: ASDisplayNode {
} }
if let mainContainerNode = self.mainContainerNode { if let mainContainerNode = self.mainContainerNode {
mainContainerNode.displayFilterLimit = { [weak self] in
guard let strongSelf = self else {
return
}
var replaceImpl: ((ViewController) -> Void)?
let controller = context.sharedContext.makePremiumLimitController(context: context, subject: .folders, count: strongSelf.controller?.tabContainerNode?.filtersCount ?? 0, action: {
let controller = context.sharedContext.makePremiumIntroController(context: context, source: .folders)
replaceImpl?(controller)
})
replaceImpl = { [weak controller] c in
controller?.replace(with: c)
}
strongSelf.controller?.push(controller)
}
self.addSubnode(mainContainerNode) self.addSubnode(mainContainerNode)
} }
if let chatListNode = self.chatListNode { if let chatListNode = self.chatListNode {

View File

@ -1657,6 +1657,23 @@ public final class SharedAccountContextImpl: SharedAccountContext {
return PremiumDemoScreen(context: context, subject: mappedSubject, action: action) return PremiumDemoScreen(context: context, subject: mappedSubject, action: action)
} }
public func makePremiumLimitController(context: AccountContext, subject: PremiumLimitSubject, count: Int32, action: @escaping () -> Void) -> ViewController {
let mappedSubject: PremiumLimitScreen.Subject
switch subject {
case .folders:
mappedSubject = .folders
case .chatsPerFolder:
mappedSubject = .chatsPerFolder
case .pins:
mappedSubject = .pins
case .files:
mappedSubject = .files
case .accounts:
mappedSubject = .accounts
}
return PremiumLimitScreen(context: context, subject: mappedSubject, count: count, action: action)
}
public func makeStickerPackScreen(context: AccountContext, updatedPresentationData: (initial: PresentationData, signal: Signal<PresentationData, NoError>)?, mainStickerPack: StickerPackReference, stickerPacks: [StickerPackReference], loadedStickerPacks: [LoadedStickerPack], parentNavigationController: NavigationController?, sendSticker: ((FileMediaReference, UIView, CGRect) -> Bool)?) -> ViewController { public func makeStickerPackScreen(context: AccountContext, updatedPresentationData: (initial: PresentationData, signal: Signal<PresentationData, NoError>)?, mainStickerPack: StickerPackReference, stickerPacks: [StickerPackReference], loadedStickerPacks: [LoadedStickerPack], parentNavigationController: NavigationController?, sendSticker: ((FileMediaReference, UIView, CGRect) -> Bool)?) -> ViewController {
return StickerPackScreen(context: context, updatedPresentationData: updatedPresentationData, mainStickerPack: mainStickerPack, stickerPacks: stickerPacks, loadedStickerPacks: loadedStickerPacks, parentNavigationController: parentNavigationController, sendSticker: sendSticker) return StickerPackScreen(context: context, updatedPresentationData: updatedPresentationData, mainStickerPack: mainStickerPack, stickerPacks: stickerPacks, loadedStickerPacks: loadedStickerPacks, parentNavigationController: parentNavigationController, sendSticker: sendSticker)
} }