Use imperial distance units for en_GB

This commit is contained in:
Ilya Laktyushin 2020-10-23 19:30:05 +04:00
parent 0457354220
commit 561bee0f3b
2 changed files with 6 additions and 2 deletions

View File

@ -325,7 +325,11 @@ class LocationDistancePickerScreenNode: ViewControllerTracingNode, UIScrollViewD
} }
private func usesMetricSystem() -> Bool { private func usesMetricSystem() -> Bool {
return localeWithStrings(self.presentationData.strings).usesMetricSystem let locale = localeWithStrings(self.presentationData.strings)
if locale.identifier.hasSuffix("GB") {
return false
}
return locale.usesMetricSystem
} }
func numberOfComponents(in pickerView: UIPickerView) -> Int { func numberOfComponents(in pickerView: UIPickerView) -> Int {

View File

@ -260,7 +260,7 @@ func textMediaAndExpirationTimerFromApiMedia(_ media: Api.MessageMedia?, _ peerI
case let .messageMediaVenue(geo, title, address, provider, venueId, venueType): case let .messageMediaVenue(geo, title, address, provider, venueId, venueType):
let mediaMap = telegramMediaMapFromApiGeoPoint(geo, title: title, address: address, provider: provider, venueId: venueId, venueType: venueType, liveBroadcastingTimeout: nil, liveProximityNotificationRadius: nil, heading: nil) let mediaMap = telegramMediaMapFromApiGeoPoint(geo, title: title, address: address, provider: provider, venueId: venueId, venueType: venueType, liveBroadcastingTimeout: nil, liveProximityNotificationRadius: nil, heading: nil)
return (mediaMap, nil) return (mediaMap, nil)
case let .messageMediaGeoLive(flags, geo, heading, period, proximityNotificationRadius): case let .messageMediaGeoLive(_, geo, heading, period, proximityNotificationRadius):
let mediaMap = telegramMediaMapFromApiGeoPoint(geo, title: nil, address: nil, provider: nil, venueId: nil, venueType: nil, liveBroadcastingTimeout: period, liveProximityNotificationRadius: proximityNotificationRadius, heading: heading) let mediaMap = telegramMediaMapFromApiGeoPoint(geo, title: nil, address: nil, provider: nil, venueId: nil, venueType: nil, liveBroadcastingTimeout: period, liveProximityNotificationRadius: proximityNotificationRadius, heading: heading)
return (mediaMap, nil) return (mediaMap, nil)
case let .messageMediaDocument(_, document, ttlSeconds): case let .messageMediaDocument(_, document, ttlSeconds):