mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-08 19:10:53 +00:00
Various fixes
This commit is contained in:
parent
ed2b41a1a1
commit
8abcfbd895
@ -22,6 +22,7 @@ import PremiumCoinComponent
|
||||
import Markdown
|
||||
import CountrySelectionUI
|
||||
import AccountContext
|
||||
import AlertUI
|
||||
|
||||
final class AuthorizationSequencePaymentScreenComponent: Component {
|
||||
typealias EnvironmentType = ViewControllerComponentContainer.Environment
|
||||
@ -142,12 +143,9 @@ final class AuthorizationSequencePaymentScreenComponent: Component {
|
||||
}
|
||||
|
||||
if let errorText {
|
||||
//addAppLogEvent(postbox: component.engine.account.postbox, type: "premium_gift.promo_screen_fail")
|
||||
|
||||
let _ = errorText
|
||||
let _ = controller
|
||||
//let alertController = textAlertController(context: component.context, title: nil, text: errorText, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})])
|
||||
//controller.present(alertController, in: .window(.root))
|
||||
let theme = AlertControllerTheme(presentationData: presentationData)
|
||||
let alertController = textAlertController(alertContext: AlertControllerContext(theme: theme, themeSignal: .single(theme)), title: nil, text: errorText, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})])
|
||||
controller.present(alertController, in: .window(.root))
|
||||
}
|
||||
}))
|
||||
} else {
|
||||
|
@ -632,7 +632,7 @@ public final class TabSelectorComponent: Component {
|
||||
}
|
||||
|
||||
let estimatedContentWidth = 2.0 * spacing + innerContentWidth + (CGFloat(component.items.count - 1) * (spacing + innerInset))
|
||||
if component.customLayout?.fillWidth == true && estimatedContentWidth < availableSize.width {
|
||||
if component.customLayout?.fillWidth == true && estimatedContentWidth < availableSize.width && component.items.count > 1 {
|
||||
spacing = (availableSize.width - innerContentWidth) / CGFloat(component.items.count + 1) - innerInset * 2.0
|
||||
} else if estimatedContentWidth > availableSize.width && !allowScroll {
|
||||
spacing = (availableSize.width - innerContentWidth) / CGFloat(component.items.count + 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user