mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Story locations
This commit is contained in:
@@ -622,7 +622,24 @@ public func createGroupControllerImpl(context: AccountContext, peerIds: [PeerId]
|
||||
}
|
||||
|
||||
venuesPromise.set(nearbyVenues(context: context, latitude: latitude, longitude: longitude)
|
||||
|> map(Optional.init))
|
||||
|> map { contextResult -> [TelegramMediaMap]? in
|
||||
if let contextResult {
|
||||
var resultVenues: [TelegramMediaMap] = []
|
||||
for result in contextResult.results {
|
||||
switch result.message {
|
||||
case let .mapLocation(mapMedia, _):
|
||||
if let _ = mapMedia.venue {
|
||||
resultVenues.append(mapMedia)
|
||||
}
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
return resultVenues
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
let arguments = CreateGroupArguments(context: context, updateEditingName: { editingName in
|
||||
@@ -1102,7 +1119,7 @@ public func createGroupControllerImpl(context: AccountContext, peerIds: [PeerId]
|
||||
}, changeLocation: {
|
||||
endEditingImpl?()
|
||||
|
||||
let controller = LocationPickerController(context: context, mode: .pick, completion: { location, address in
|
||||
let controller = LocationPickerController(context: context, mode: .pick, completion: { location, _, _, address in
|
||||
let addressSignal: Signal<String, NoError>
|
||||
if let address = address {
|
||||
addressSignal = .single(address)
|
||||
|
||||
Reference in New Issue
Block a user