mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-01 20:28:05 +00:00
Various fixes
This commit is contained in:
parent
35792f43c6
commit
c14a7781a8
@ -66,7 +66,7 @@ public class PremiumLimitsListScreen: ViewController {
|
|||||||
self.pagerView = ComponentHostView()
|
self.pagerView = ComponentHostView()
|
||||||
self.closeView = ComponentHostView()
|
self.closeView = ComponentHostView()
|
||||||
|
|
||||||
self.footerNode = FooterNode(theme: self.presentationData.theme, title: buttonTitle, gloss: gloss)
|
self.footerNode = FooterNode(theme: self.presentationData.theme, title: buttonTitle, gloss: gloss, order: controller.order)
|
||||||
|
|
||||||
super.init()
|
super.init()
|
||||||
|
|
||||||
@ -1087,6 +1087,8 @@ public class PremiumLimitsListScreen: ViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class FooterNode: ASDisplayNode {
|
private class FooterNode: ASDisplayNode {
|
||||||
|
private let order: [PremiumPerk]?
|
||||||
|
|
||||||
private let backgroundNode: NavigationBackgroundNode
|
private let backgroundNode: NavigationBackgroundNode
|
||||||
private let separatorNode: ASDisplayNode
|
private let separatorNode: ASDisplayNode
|
||||||
private let coverNode: ASDisplayNode
|
private let coverNode: ASDisplayNode
|
||||||
@ -1099,7 +1101,8 @@ private class FooterNode: ASDisplayNode {
|
|||||||
|
|
||||||
var action: () -> Void = {}
|
var action: () -> Void = {}
|
||||||
|
|
||||||
init(theme: PresentationTheme, title: String, gloss: Bool) {
|
init(theme: PresentationTheme, title: String, gloss: Bool, order: [PremiumPerk]?) {
|
||||||
|
self.order = order
|
||||||
self.theme = theme
|
self.theme = theme
|
||||||
|
|
||||||
self.backgroundNode = NavigationBackgroundNode(color: theme.rootController.tabBar.backgroundColor)
|
self.backgroundNode = NavigationBackgroundNode(color: theme.rootController.tabBar.backgroundColor)
|
||||||
@ -1171,7 +1174,7 @@ private class FooterNode: ASDisplayNode {
|
|||||||
|
|
||||||
var panelHeight: CGFloat = bottomPanelPadding + 50.0 + bottomInset + 8.0
|
var panelHeight: CGFloat = bottomPanelPadding + 50.0 + bottomInset + 8.0
|
||||||
var buttonOffset: CGFloat = 20.0
|
var buttonOffset: CGFloat = 20.0
|
||||||
if let (_, count) = self.currentParams, count > 1 {
|
if let order, order.count > 1 {
|
||||||
panelHeight += 20.0
|
panelHeight += 20.0
|
||||||
buttonOffset += 20.0
|
buttonOffset += 20.0
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user