mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various fixes
This commit is contained in:
parent
1cc27e2a20
commit
2761be7991
@ -63,6 +63,7 @@ public final class SheetComponent<ChildEnvironmentType: Equatable>: Component {
|
||||
public let backgroundColor: BackgroundColor
|
||||
public let followContentSizeChanges: Bool
|
||||
public let clipsContent: Bool
|
||||
public let isScrollEnabled: Bool
|
||||
public let externalState: ExternalState?
|
||||
public let animateOut: ActionSlot<Action<()>>
|
||||
public let onPan: () -> Void
|
||||
@ -72,6 +73,7 @@ public final class SheetComponent<ChildEnvironmentType: Equatable>: Component {
|
||||
backgroundColor: BackgroundColor,
|
||||
followContentSizeChanges: Bool = false,
|
||||
clipsContent: Bool = false,
|
||||
isScrollEnabled: Bool = true,
|
||||
externalState: ExternalState? = nil,
|
||||
animateOut: ActionSlot<Action<()>>,
|
||||
onPan: @escaping () -> Void = {}
|
||||
@ -80,6 +82,7 @@ public final class SheetComponent<ChildEnvironmentType: Equatable>: Component {
|
||||
self.backgroundColor = backgroundColor
|
||||
self.followContentSizeChanges = followContentSizeChanges
|
||||
self.clipsContent = clipsContent
|
||||
self.isScrollEnabled = isScrollEnabled
|
||||
self.externalState = externalState
|
||||
self.animateOut = animateOut
|
||||
self.onPan = onPan
|
||||
@ -389,6 +392,8 @@ public final class SheetComponent<ChildEnvironmentType: Equatable>: Component {
|
||||
updateContentSize()
|
||||
}
|
||||
|
||||
self.scrollView.isScrollEnabled = component.isScrollEnabled
|
||||
|
||||
self.ignoreScrolling = false
|
||||
if let currentAvailableSize = self.currentAvailableSize, currentAvailableSize.height != availableSize.height {
|
||||
self.scrollView.contentOffset = CGPoint(x: 0.0, y: -(availableSize.height - contentSize.height))
|
||||
|
@ -21,7 +21,7 @@ private func loadCountryCodes() -> [Country] {
|
||||
}
|
||||
|
||||
let delimiter = ";"
|
||||
let endOfLine = "\n"
|
||||
let endOfLine = "\r\n"
|
||||
|
||||
var result: [Country] = []
|
||||
var countriesByPrefix: [String: (Country, Country.CountryCode)] = [:]
|
||||
|
@ -267,6 +267,7 @@ private final class BirthdayPickerScreenComponent: Component {
|
||||
}
|
||||
)),
|
||||
backgroundColor: .color(environment.theme.list.plainBackgroundColor),
|
||||
isScrollEnabled: false,
|
||||
animateOut: self.sheetAnimateOut
|
||||
)),
|
||||
environment: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user