mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
UI and theme improvements
This commit is contained in:
@@ -3302,17 +3302,19 @@ public extension Api {
|
||||
|
||||
}
|
||||
public enum WallPaperSettings: TypeConstructorDescription {
|
||||
case wallPaperSettings(flags: Int32, backgroundColor: Int32?, secondBackgroundColor: Int32?, intensity: Int32?, rotation: Int32?)
|
||||
case wallPaperSettings(flags: Int32, backgroundColor: Int32?, secondBackgroundColor: Int32?, thirdBackgroundColor: Int32?, fourthBackgroundColor: Int32?, intensity: Int32?, rotation: Int32?)
|
||||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
case .wallPaperSettings(let flags, let backgroundColor, let secondBackgroundColor, let intensity, let rotation):
|
||||
case .wallPaperSettings(let flags, let backgroundColor, let secondBackgroundColor, let thirdBackgroundColor, let fourthBackgroundColor, let intensity, let rotation):
|
||||
if boxed {
|
||||
buffer.appendInt32(84438264)
|
||||
buffer.appendInt32(499236004)
|
||||
}
|
||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
||||
if Int(flags) & Int(1 << 0) != 0 {serializeInt32(backgroundColor!, buffer: buffer, boxed: false)}
|
||||
if Int(flags) & Int(1 << 4) != 0 {serializeInt32(secondBackgroundColor!, buffer: buffer, boxed: false)}
|
||||
if Int(flags) & Int(1 << 5) != 0 {serializeInt32(thirdBackgroundColor!, buffer: buffer, boxed: false)}
|
||||
if Int(flags) & Int(1 << 6) != 0 {serializeInt32(fourthBackgroundColor!, buffer: buffer, boxed: false)}
|
||||
if Int(flags) & Int(1 << 3) != 0 {serializeInt32(intensity!, buffer: buffer, boxed: false)}
|
||||
if Int(flags) & Int(1 << 4) != 0 {serializeInt32(rotation!, buffer: buffer, boxed: false)}
|
||||
break
|
||||
@@ -3321,8 +3323,8 @@ public extension Api {
|
||||
|
||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
||||
switch self {
|
||||
case .wallPaperSettings(let flags, let backgroundColor, let secondBackgroundColor, let intensity, let rotation):
|
||||
return ("wallPaperSettings", [("flags", flags), ("backgroundColor", backgroundColor), ("secondBackgroundColor", secondBackgroundColor), ("intensity", intensity), ("rotation", rotation)])
|
||||
case .wallPaperSettings(let flags, let backgroundColor, let secondBackgroundColor, let thirdBackgroundColor, let fourthBackgroundColor, let intensity, let rotation):
|
||||
return ("wallPaperSettings", [("flags", flags), ("backgroundColor", backgroundColor), ("secondBackgroundColor", secondBackgroundColor), ("thirdBackgroundColor", thirdBackgroundColor), ("fourthBackgroundColor", fourthBackgroundColor), ("intensity", intensity), ("rotation", rotation)])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3334,16 +3336,22 @@ public extension Api {
|
||||
var _3: Int32?
|
||||
if Int(_1!) & Int(1 << 4) != 0 {_3 = reader.readInt32() }
|
||||
var _4: Int32?
|
||||
if Int(_1!) & Int(1 << 3) != 0 {_4 = reader.readInt32() }
|
||||
if Int(_1!) & Int(1 << 5) != 0 {_4 = reader.readInt32() }
|
||||
var _5: Int32?
|
||||
if Int(_1!) & Int(1 << 4) != 0 {_5 = reader.readInt32() }
|
||||
if Int(_1!) & Int(1 << 6) != 0 {_5 = reader.readInt32() }
|
||||
var _6: Int32?
|
||||
if Int(_1!) & Int(1 << 3) != 0 {_6 = reader.readInt32() }
|
||||
var _7: Int32?
|
||||
if Int(_1!) & Int(1 << 4) != 0 {_7 = reader.readInt32() }
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil
|
||||
let _c3 = (Int(_1!) & Int(1 << 4) == 0) || _3 != nil
|
||||
let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil
|
||||
let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil
|
||||
if _c1 && _c2 && _c3 && _c4 && _c5 {
|
||||
return Api.WallPaperSettings.wallPaperSettings(flags: _1!, backgroundColor: _2, secondBackgroundColor: _3, intensity: _4, rotation: _5)
|
||||
let _c4 = (Int(_1!) & Int(1 << 5) == 0) || _4 != nil
|
||||
let _c5 = (Int(_1!) & Int(1 << 6) == 0) || _5 != nil
|
||||
let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil
|
||||
let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil
|
||||
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 {
|
||||
return Api.WallPaperSettings.wallPaperSettings(flags: _1!, backgroundColor: _2, secondBackgroundColor: _3, thirdBackgroundColor: _4, fourthBackgroundColor: _5, intensity: _6, rotation: _7)
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
@@ -4662,7 +4670,7 @@ public extension Api {
|
||||
case updateTheme(theme: Api.Theme)
|
||||
case updateGeoLiveViewed(peer: Api.Peer, msgId: Int32)
|
||||
case updateLoginToken
|
||||
case updateMessagePollVote(pollId: Int64, userId: Int32, options: [Buffer])
|
||||
case updateMessagePollVote(pollId: Int64, userId: Int32, options: [Buffer], qts: Int32)
|
||||
case updateDialogFilter(flags: Int32, id: Int32, filter: Api.DialogFilter?)
|
||||
case updateDialogFilterOrder(order: [Int32])
|
||||
case updateDialogFilters
|
||||
@@ -5291,9 +5299,9 @@ public extension Api {
|
||||
}
|
||||
|
||||
break
|
||||
case .updateMessagePollVote(let pollId, let userId, let options):
|
||||
case .updateMessagePollVote(let pollId, let userId, let options, let qts):
|
||||
if boxed {
|
||||
buffer.appendInt32(1123585836)
|
||||
buffer.appendInt32(938909451)
|
||||
}
|
||||
serializeInt64(pollId, buffer: buffer, boxed: false)
|
||||
serializeInt32(userId, buffer: buffer, boxed: false)
|
||||
@@ -5302,6 +5310,7 @@ public extension Api {
|
||||
for item in options {
|
||||
serializeBytes(item, buffer: buffer, boxed: false)
|
||||
}
|
||||
serializeInt32(qts, buffer: buffer, boxed: false)
|
||||
break
|
||||
case .updateDialogFilter(let flags, let id, let filter):
|
||||
if boxed {
|
||||
@@ -5632,8 +5641,8 @@ public extension Api {
|
||||
return ("updateGeoLiveViewed", [("peer", peer), ("msgId", msgId)])
|
||||
case .updateLoginToken:
|
||||
return ("updateLoginToken", [])
|
||||
case .updateMessagePollVote(let pollId, let userId, let options):
|
||||
return ("updateMessagePollVote", [("pollId", pollId), ("userId", userId), ("options", options)])
|
||||
case .updateMessagePollVote(let pollId, let userId, let options, let qts):
|
||||
return ("updateMessagePollVote", [("pollId", pollId), ("userId", userId), ("options", options), ("qts", qts)])
|
||||
case .updateDialogFilter(let flags, let id, let filter):
|
||||
return ("updateDialogFilter", [("flags", flags), ("id", id), ("filter", filter)])
|
||||
case .updateDialogFilterOrder(let order):
|
||||
@@ -6904,11 +6913,14 @@ public extension Api {
|
||||
if let _ = reader.readInt32() {
|
||||
_3 = Api.parseVector(reader, elementSignature: -1255641564, elementType: Buffer.self)
|
||||
}
|
||||
var _4: Int32?
|
||||
_4 = reader.readInt32()
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = _2 != nil
|
||||
let _c3 = _3 != nil
|
||||
if _c1 && _c2 && _c3 {
|
||||
return Api.Update.updateMessagePollVote(pollId: _1!, userId: _2!, options: _3!)
|
||||
let _c4 = _4 != nil
|
||||
if _c1 && _c2 && _c3 && _c4 {
|
||||
return Api.Update.updateMessagePollVote(pollId: _1!, userId: _2!, options: _3!, qts: _4!)
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user