mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-05 19:28:46 +02:00
Various fixes
This commit is contained in:
parent
7ab4685940
commit
837acfa784
3 changed files with 11 additions and 6 deletions
|
|
@ -5610,9 +5610,6 @@ public class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDeleg
|
|||
}
|
||||
|
||||
public func frameForInputActionButton() -> CGRect? {
|
||||
if !self.sendActionButtons.alpha.isZero && self.sendActionButtons.frame.minX < self.bounds.width {
|
||||
return self.sendActionButtons.frame.insetBy(dx: 0.0, dy: -4.0).offsetBy(dx: -3.0, dy: 0.0)
|
||||
}
|
||||
if !self.mediaActionButtons.alpha.isZero && self.mediaActionButtons.frame.minX < self.bounds.width {
|
||||
return self.mediaActionButtons.frame.insetBy(dx: 0.0, dy: -4.0).offsetBy(dx: -3.0, dy: 0.0)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1248,7 +1248,8 @@ final class ComposePollScreenComponent: Component {
|
|||
let stateContext = CountriesMultiselectionScreen.StateContext(
|
||||
context: component.context,
|
||||
subject: .countries,
|
||||
initialSelectedCountries: self.limitToCountries
|
||||
initialSelectedCountries: self.limitToCountries,
|
||||
showFragment: true
|
||||
)
|
||||
let _ = (stateContext.ready |> filter { $0 } |> take(1) |> deliverOnMainQueue).startStandalone(next: { [weak self] _ in
|
||||
let controller = CountriesMultiselectionScreen(
|
||||
|
|
|
|||
|
|
@ -1122,6 +1122,7 @@ public extension CountriesMultiselectionScreen {
|
|||
public let subject: Subject
|
||||
public let maxCount: Int32?
|
||||
public let initialSelectedCountries: [String]
|
||||
public let showFragment: Bool
|
||||
|
||||
private var stateDisposable: Disposable?
|
||||
private let stateSubject = Promise<State>()
|
||||
|
|
@ -1138,14 +1139,20 @@ public extension CountriesMultiselectionScreen {
|
|||
context: AccountContext,
|
||||
subject: Subject = .countries,
|
||||
maxCount: Int32? = nil,
|
||||
initialSelectedCountries: [String] = []
|
||||
initialSelectedCountries: [String] = [],
|
||||
showFragment: Bool = false
|
||||
) {
|
||||
self.subject = subject
|
||||
self.maxCount = maxCount
|
||||
self.initialSelectedCountries = initialSelectedCountries
|
||||
self.showFragment = showFragment
|
||||
|
||||
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
||||
let countries = localizedCountryNamesAndCodes(strings: presentationData.strings).sorted { lhs, rhs in
|
||||
var countryList = localizedCountryNamesAndCodes(strings: presentationData.strings)
|
||||
if showFragment {
|
||||
countryList.append((("Fragment", "Fragment"), "FT", [888]))
|
||||
}
|
||||
let countries = countryList.sorted { lhs, rhs in
|
||||
return lhs.0.1.lowercased() < rhs.0.1.lowercased()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue