Update localization and hide new features

This commit is contained in:
Isaac
2024-01-14 22:13:41 +04:00
parent c27cb4f532
commit df1e522519
35 changed files with 219 additions and 516 deletions

View File

@@ -634,102 +634,6 @@ public extension Api.contacts {
}
}
public extension Api.feed {
enum FeedMessages: TypeConstructorDescription {
case feedMessages(flags: Int32, maxPosition: Api.FeedPosition?, minPosition: Api.FeedPosition?, readMaxPosition: Api.FeedPosition?, messages: [Api.Message], chats: [Api.Chat], users: [Api.User])
case feedMessagesNotModified
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .feedMessages(let flags, let maxPosition, let minPosition, let readMaxPosition, let messages, let chats, let users):
if boxed {
buffer.appendInt32(-587770695)
}
serializeInt32(flags, buffer: buffer, boxed: false)
if Int(flags) & Int(1 << 0) != 0 {maxPosition!.serialize(buffer, true)}
if Int(flags) & Int(1 << 1) != 0 {minPosition!.serialize(buffer, true)}
if Int(flags) & Int(1 << 2) != 0 {readMaxPosition!.serialize(buffer, true)}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(messages.count))
for item in messages {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(chats.count))
for item in chats {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(users.count))
for item in users {
item.serialize(buffer, true)
}
break
case .feedMessagesNotModified:
if boxed {
buffer.appendInt32(-619039485)
}
break
}
}
public func descriptionFields() -> (String, [(String, Any)]) {
switch self {
case .feedMessages(let flags, let maxPosition, let minPosition, let readMaxPosition, let messages, let chats, let users):
return ("feedMessages", [("flags", flags as Any), ("maxPosition", maxPosition as Any), ("minPosition", minPosition as Any), ("readMaxPosition", readMaxPosition as Any), ("messages", messages as Any), ("chats", chats as Any), ("users", users as Any)])
case .feedMessagesNotModified:
return ("feedMessagesNotModified", [])
}
}
public static func parse_feedMessages(_ reader: BufferReader) -> FeedMessages? {
var _1: Int32?
_1 = reader.readInt32()
var _2: Api.FeedPosition?
if Int(_1!) & Int(1 << 0) != 0 {if let signature = reader.readInt32() {
_2 = Api.parse(reader, signature: signature) as? Api.FeedPosition
} }
var _3: Api.FeedPosition?
if Int(_1!) & Int(1 << 1) != 0 {if let signature = reader.readInt32() {
_3 = Api.parse(reader, signature: signature) as? Api.FeedPosition
} }
var _4: Api.FeedPosition?
if Int(_1!) & Int(1 << 2) != 0 {if let signature = reader.readInt32() {
_4 = Api.parse(reader, signature: signature) as? Api.FeedPosition
} }
var _5: [Api.Message]?
if let _ = reader.readInt32() {
_5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self)
}
var _6: [Api.Chat]?
if let _ = reader.readInt32() {
_6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self)
}
var _7: [Api.User]?
if let _ = reader.readInt32() {
_7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self)
}
let _c1 = _1 != nil
let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil
let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil
let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil
let _c5 = _5 != nil
let _c6 = _6 != nil
let _c7 = _7 != nil
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 {
return Api.feed.FeedMessages.feedMessages(flags: _1!, maxPosition: _2, minPosition: _3, readMaxPosition: _4, messages: _5!, chats: _6!, users: _7!)
}
else {
return nil
}
}
public static func parse_feedMessagesNotModified(_ reader: BufferReader) -> FeedMessages? {
return Api.feed.FeedMessages.feedMessagesNotModified
}
}
}
public extension Api.help {
enum AppConfig: TypeConstructorDescription {
case appConfig(hash: Int32, config: Api.JSONValue)
@@ -1400,3 +1304,89 @@ public extension Api.help {
}
}
public extension Api.help {
enum PremiumPromo: TypeConstructorDescription {
case premiumPromo(statusText: String, statusEntities: [Api.MessageEntity], videoSections: [String], videos: [Api.Document], periodOptions: [Api.PremiumSubscriptionOption], users: [Api.User])
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
case .premiumPromo(let statusText, let statusEntities, let videoSections, let videos, let periodOptions, let users):
if boxed {
buffer.appendInt32(1395946908)
}
serializeString(statusText, buffer: buffer, boxed: false)
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(statusEntities.count))
for item in statusEntities {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(videoSections.count))
for item in videoSections {
serializeString(item, buffer: buffer, boxed: false)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(videos.count))
for item in videos {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(periodOptions.count))
for item in periodOptions {
item.serialize(buffer, true)
}
buffer.appendInt32(481674261)
buffer.appendInt32(Int32(users.count))
for item in users {
item.serialize(buffer, true)
}
break
}
}
public func descriptionFields() -> (String, [(String, Any)]) {
switch self {
case .premiumPromo(let statusText, let statusEntities, let videoSections, let videos, let periodOptions, let users):
return ("premiumPromo", [("statusText", statusText as Any), ("statusEntities", statusEntities as Any), ("videoSections", videoSections as Any), ("videos", videos as Any), ("periodOptions", periodOptions as Any), ("users", users as Any)])
}
}
public static func parse_premiumPromo(_ reader: BufferReader) -> PremiumPromo? {
var _1: String?
_1 = parseString(reader)
var _2: [Api.MessageEntity]?
if let _ = reader.readInt32() {
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self)
}
var _3: [String]?
if let _ = reader.readInt32() {
_3 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self)
}
var _4: [Api.Document]?
if let _ = reader.readInt32() {
_4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self)
}
var _5: [Api.PremiumSubscriptionOption]?
if let _ = reader.readInt32() {
_5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PremiumSubscriptionOption.self)
}
var _6: [Api.User]?
if let _ = reader.readInt32() {
_6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self)
}
let _c1 = _1 != nil
let _c2 = _2 != nil
let _c3 = _3 != nil
let _c4 = _4 != nil
let _c5 = _5 != nil
let _c6 = _6 != nil
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 {
return Api.help.PremiumPromo.premiumPromo(statusText: _1!, statusEntities: _2!, videoSections: _3!, videos: _4!, periodOptions: _5!, users: _6!)
}
else {
return nil
}
}
}
}