mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various fixes
This commit is contained in:
@@ -150,7 +150,7 @@ private enum LocationPickerEntry: Comparable, Identifiable {
|
||||
case let .city(_, title, subtitle, _, _, _, coordinate, name, countryCode):
|
||||
let icon: LocationActionListItemIcon
|
||||
if let name {
|
||||
icon = .venue(TelegramMediaMap(latitude: 0, longitude: 0, heading: nil, accuracyRadius: nil, geoPlace: nil, venue: MapVenue(title: name, address: "City", provider: nil, id: "city", type: "building/default"), liveBroadcastingTimeout: nil, liveProximityNotificationRadius: nil))
|
||||
icon = .venue(TelegramMediaMap(latitude: 0, longitude: 0, heading: nil, accuracyRadius: nil, geoPlace: nil, venue: MapVenue(title: name, address: presentationData.strings.Location_TypeCity, provider: "city", id: countryCode, type: "building/default"), liveBroadcastingTimeout: nil, liveProximityNotificationRadius: nil))
|
||||
} else {
|
||||
icon = .location
|
||||
}
|
||||
@@ -583,20 +583,28 @@ final class LocationPickerControllerNode: ViewControllerTracingNode, CLLocationM
|
||||
switch strongSelf.mode {
|
||||
case .share:
|
||||
if source == .story {
|
||||
title = "Add This Location"
|
||||
title = presentationData.strings.Location_AddThisLocation
|
||||
} else {
|
||||
title = presentationData.strings.Map_SendThisLocation
|
||||
}
|
||||
case .pick:
|
||||
title = presentationData.strings.Map_SetThisLocation
|
||||
}
|
||||
entries.append(.location(presentationData.theme, title, address ?? presentationData.strings.Map_Locating, nil, nil, nil, coordinate, state.street, state.countryCode, true))
|
||||
if source == .story {
|
||||
if state.street != "" {
|
||||
entries.append(.location(presentationData.theme, state.street ?? presentationData.strings.Map_Locating, state.isStreet ? presentationData.strings.Location_TypeStreet : presentationData.strings.Location_TypeLocation, nil, nil, nil, coordinate, state.street, nil, false))
|
||||
} else if state.city != "" {
|
||||
entries.append(.city(presentationData.theme, state.city ?? presentationData.strings.Map_Locating, presentationData.strings.Location_TypeCity, nil, nil, nil, coordinate, state.city, state.countryCode))
|
||||
}
|
||||
} else {
|
||||
entries.append(.location(presentationData.theme, title, address ?? presentationData.strings.Map_Locating, nil, nil, nil, coordinate, state.street, nil, true))
|
||||
}
|
||||
case .selecting:
|
||||
let title: String
|
||||
switch strongSelf.mode {
|
||||
case .share:
|
||||
if source == .story {
|
||||
title = "Add This Location"
|
||||
title = presentationData.strings.Location_AddThisLocation
|
||||
} else {
|
||||
title = presentationData.strings.Map_SendThisLocation
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user