Skip to content

Commit

Permalink
Merge pull request #83 from aaronvegh/av/locale-identifiers
Browse files Browse the repository at this point in the history
Derive only the language code from the Locale objects
  • Loading branch information
MasterJ93 authored Dec 29, 2024
2 parents 73aeb94 + fe89e89 commit e532bdb
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,14 @@ extension ATProtoBluesky {
}

// Locales
let localeIdentifiers = locales.isEmpty ? nil : locales.map { $0.identifier }
let localeIdentifiers: [String]?
if #available(iOS 16, *) {
localeIdentifiers = locales.isEmpty ? nil : locales.compactMap {
$0.language.languageCode?.identifier
}
} else {
localeIdentifiers = locales.isEmpty ? nil : locales.compactMap { $0.languageCode }
}

// Embed
var resolvedEmbed: ATUnion.PostEmbedUnion? = nil
Expand Down

0 comments on commit e532bdb

Please sign in to comment.