mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Rename TelegramCore source folder
This commit is contained in:
25
submodules/TelegramCore/Sources/CachedChannelData.swift
Normal file
25
submodules/TelegramCore/Sources/CachedChannelData.swift
Normal file
@@ -0,0 +1,25 @@
|
||||
import Foundation
|
||||
#if os(macOS)
|
||||
import PostboxMac
|
||||
import TelegramApiMac
|
||||
#else
|
||||
import Postbox
|
||||
import TelegramApi
|
||||
#endif
|
||||
|
||||
import SyncCore
|
||||
|
||||
extension PeerGeoLocation {
|
||||
init?(apiLocation: Api.ChannelLocation) {
|
||||
switch apiLocation {
|
||||
case let .channelLocation(geopoint, address):
|
||||
if case let .geoPoint(longitude, latitude, _) = geopoint {
|
||||
self.init(latitude: latitude, longitude: longitude, address: address)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user