mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Api update [skip ci]
This commit is contained in:
parent
c1210945cd
commit
d5fbd880ec
@ -623,7 +623,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
||||
dict[668375447] = { return Api.InputFileLocation.parse_inputPeerPhotoFileLocation($0) }
|
||||
dict[230353641] = { return Api.InputFileLocation.parse_inputStickerSetThumb($0) }
|
||||
dict[286776671] = { return Api.GeoPoint.parse_geoPointEmpty($0) }
|
||||
dict[-955487525] = { return Api.GeoPoint.parse_geoPoint($0) }
|
||||
dict[-1297942941] = { return Api.GeoPoint.parse_geoPoint($0) }
|
||||
dict[506920429] = { return Api.InputPhoneCall.parse_inputPhoneCall($0) }
|
||||
dict[-1551583367] = { return Api.ReceivedNotifyMessage.parse_receivedNotifyMessage($0) }
|
||||
dict[-57668565] = { return Api.ChatParticipants.parse_chatParticipantsForbidden($0) }
|
||||
|
@ -18085,7 +18085,7 @@ public extension Api {
|
||||
}
|
||||
public enum GeoPoint: TypeConstructorDescription {
|
||||
case geoPointEmpty
|
||||
case geoPoint(flags: Int32, long: Double, lat: Double, accuracyRadius: Int32?)
|
||||
case geoPoint(flags: Int32, long: Double, lat: Double, accessHash: Int64, accuracyRadius: Int32?)
|
||||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
@ -18095,13 +18095,14 @@ public extension Api {
|
||||
}
|
||||
|
||||
break
|
||||
case .geoPoint(let flags, let long, let lat, let accuracyRadius):
|
||||
case .geoPoint(let flags, let long, let lat, let accessHash, let accuracyRadius):
|
||||
if boxed {
|
||||
buffer.appendInt32(-955487525)
|
||||
buffer.appendInt32(-1297942941)
|
||||
}
|
||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
||||
serializeDouble(long, buffer: buffer, boxed: false)
|
||||
serializeDouble(lat, buffer: buffer, boxed: false)
|
||||
serializeInt64(accessHash, buffer: buffer, boxed: false)
|
||||
if Int(flags) & Int(1 << 0) != 0 {serializeInt32(accuracyRadius!, buffer: buffer, boxed: false)}
|
||||
break
|
||||
}
|
||||
@ -18111,8 +18112,8 @@ public extension Api {
|
||||
switch self {
|
||||
case .geoPointEmpty:
|
||||
return ("geoPointEmpty", [])
|
||||
case .geoPoint(let flags, let long, let lat, let accuracyRadius):
|
||||
return ("geoPoint", [("flags", flags), ("long", long), ("lat", lat), ("accuracyRadius", accuracyRadius)])
|
||||
case .geoPoint(let flags, let long, let lat, let accessHash, let accuracyRadius):
|
||||
return ("geoPoint", [("flags", flags), ("long", long), ("lat", lat), ("accessHash", accessHash), ("accuracyRadius", accuracyRadius)])
|
||||
}
|
||||
}
|
||||
|
||||
@ -18126,14 +18127,17 @@ public extension Api {
|
||||
_2 = reader.readDouble()
|
||||
var _3: Double?
|
||||
_3 = reader.readDouble()
|
||||
var _4: Int32?
|
||||
if Int(_1!) & Int(1 << 0) != 0 {_4 = reader.readInt32() }
|
||||
var _4: Int64?
|
||||
_4 = reader.readInt64()
|
||||
var _5: Int32?
|
||||
if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt32() }
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = _2 != nil
|
||||
let _c3 = _3 != nil
|
||||
let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil
|
||||
if _c1 && _c2 && _c3 && _c4 {
|
||||
return Api.GeoPoint.geoPoint(flags: _1!, long: _2!, lat: _3!, accuracyRadius: _4)
|
||||
let _c4 = _4 != nil
|
||||
let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil
|
||||
if _c1 && _c2 && _c3 && _c4 && _c5 {
|
||||
return Api.GeoPoint.geoPoint(flags: _1!, long: _2!, lat: _3!, accessHash: _4!, accuracyRadius: _5)
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
|
@ -8,7 +8,7 @@ extension PeerGeoLocation {
|
||||
init?(apiLocation: Api.ChannelLocation) {
|
||||
switch apiLocation {
|
||||
case let .channelLocation(geopoint, address):
|
||||
if case let .geoPoint(_, longitude, latitude, _) = geopoint {
|
||||
if case let .geoPoint(_, longitude, latitude, _, _) = geopoint {
|
||||
self.init(latitude: latitude, longitude: longitude, address: address)
|
||||
} else {
|
||||
return nil
|
||||
|
@ -158,7 +158,7 @@ extension InstantPageBlock {
|
||||
self = .relatedArticles(title: RichText(apiText: title), articles: articles.map({ InstantPageRelatedArticle(apiRelatedArticle: $0) }))
|
||||
case let .pageBlockMap(geo, zoom, w, h, caption):
|
||||
switch geo {
|
||||
case let .geoPoint(_, long, lat, _):
|
||||
case let .geoPoint(_, long, lat, _, _):
|
||||
self = .map(latitude: lat, longitude: long, zoom: zoom, dimensions: PixelDimensions(width: w, height: h), caption: InstantPageCaption(apiCaption: caption))
|
||||
default:
|
||||
self = .unsupported
|
||||
|
@ -10,7 +10,7 @@ func telegramMediaMapFromApiGeoPoint(_ geo: Api.GeoPoint, title: String?, addres
|
||||
venue = MapVenue(title: title, address: address, provider: provider, id: venueId, type: venueType)
|
||||
}
|
||||
switch geo {
|
||||
case let .geoPoint(_, long, lat, accuracyRadius):
|
||||
case let .geoPoint(_, long, lat, accessHash, accuracyRadius):
|
||||
return TelegramMediaMap(latitude: lat, longitude: long, geoPlace: nil, venue: venue, liveBroadcastingTimeout: liveBroadcastingTimeout)
|
||||
case .geoPointEmpty:
|
||||
return TelegramMediaMap(latitude: 0.0, longitude: 0.0, geoPlace: nil, venue: venue, liveBroadcastingTimeout: liveBroadcastingTimeout)
|
||||
|
Loading…
x
Reference in New Issue
Block a user