mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Various fixes
This commit is contained in:
parent
837acfa784
commit
5d7edcf36f
4 changed files with 12 additions and 4 deletions
|
|
@ -2924,7 +2924,9 @@ public class ChatMessagePollBubbleContentNode: ChatMessageBubbleContentNode {
|
|||
if !poll.countries.isEmpty {
|
||||
let locale = localeWithStrings(item.presentationData.strings)
|
||||
let countryNames = poll.countries.map { id in
|
||||
if let countryName = locale.localizedString(forRegionCode: id) {
|
||||
if id == "FT" {
|
||||
return "Fragment"
|
||||
} else if let countryName = locale.localizedString(forRegionCode: id) {
|
||||
return countryName
|
||||
} else {
|
||||
return id
|
||||
|
|
|
|||
|
|
@ -2396,7 +2396,11 @@ final class ComposePollScreenComponent: Component {
|
|||
if self.limitToCountries.count > 1 {
|
||||
value = environment.strings.CreatePoll_AllowedCountries_Countries(Int32(self.limitToCountries.count))
|
||||
} else if self.limitToCountries.count == 1, let countryCode = self.limitToCountries.first {
|
||||
value = self.currentLocale?.localizedString(forRegionCode: countryCode) ?? countryCode
|
||||
if countryCode == "FT" {
|
||||
value = "Fragment"
|
||||
} else {
|
||||
value = self.currentLocale?.localizedString(forRegionCode: countryCode) ?? countryCode
|
||||
}
|
||||
} else {
|
||||
value = ""
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1163,7 +1163,7 @@ public extension CountriesMultiselectionScreen {
|
|||
var currentSection: String?
|
||||
var currentCountries: [CountryItem] = []
|
||||
for country in countries {
|
||||
let section = String(country.0.1.prefix(1))
|
||||
let section = String(country.0.1.prefix(1)).uppercased()
|
||||
if currentSection != section {
|
||||
if let currentSection {
|
||||
sections.append((currentSection, currentCountries))
|
||||
|
|
|
|||
|
|
@ -2310,7 +2310,9 @@ func contextMenuForChatPresentationInterfaceState(chatPresentationInterfaceState
|
|||
if !poll.countries.isEmpty {
|
||||
let locale = localeWithStrings(chatPresentationInterfaceState.strings)
|
||||
let countryNames = poll.countries.map { id in
|
||||
if let countryName = locale.localizedString(forRegionCode: id) {
|
||||
if id == "FT" {
|
||||
return "Fragment"
|
||||
} else if let countryName = locale.localizedString(forRegionCode: id) {
|
||||
return countryName
|
||||
} else {
|
||||
return id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue