mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-01 04:08:07 +00:00
Various fixes
This commit is contained in:
parent
ed2b41a1a1
commit
8abcfbd895
@ -22,6 +22,7 @@ import PremiumCoinComponent
|
|||||||
import Markdown
|
import Markdown
|
||||||
import CountrySelectionUI
|
import CountrySelectionUI
|
||||||
import AccountContext
|
import AccountContext
|
||||||
|
import AlertUI
|
||||||
|
|
||||||
final class AuthorizationSequencePaymentScreenComponent: Component {
|
final class AuthorizationSequencePaymentScreenComponent: Component {
|
||||||
typealias EnvironmentType = ViewControllerComponentContainer.Environment
|
typealias EnvironmentType = ViewControllerComponentContainer.Environment
|
||||||
@ -142,12 +143,9 @@ final class AuthorizationSequencePaymentScreenComponent: Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let errorText {
|
if let errorText {
|
||||||
//addAppLogEvent(postbox: component.engine.account.postbox, type: "premium_gift.promo_screen_fail")
|
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: {})])
|
||||||
let _ = errorText
|
controller.present(alertController, in: .window(.root))
|
||||||
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))
|
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -632,7 +632,7 @@ public final class TabSelectorComponent: Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let estimatedContentWidth = 2.0 * spacing + innerContentWidth + (CGFloat(component.items.count - 1) * (spacing + innerInset))
|
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
|
spacing = (availableSize.width - innerContentWidth) / CGFloat(component.items.count + 1) - innerInset * 2.0
|
||||||
} else if estimatedContentWidth > availableSize.width && !allowScroll {
|
} else if estimatedContentWidth > availableSize.width && !allowScroll {
|
||||||
spacing = (availableSize.width - innerContentWidth) / CGFloat(component.items.count + 1)
|
spacing = (availableSize.width - innerContentWidth) / CGFloat(component.items.count + 1)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user