mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-27 13:40:41 +00:00
Change sticker pack flag names
This commit is contained in:
parent
7cbe16a6e9
commit
c747b1229d
@ -22,19 +22,22 @@ public struct StickerPackCollectionInfoFlags: OptionSet {
|
|||||||
public init(_ flags: StickerPackCollectionInfoFlags) {
|
public init(_ flags: StickerPackCollectionInfoFlags) {
|
||||||
var rawValue: Int32 = 0
|
var rawValue: Int32 = 0
|
||||||
|
|
||||||
if flags.contains(StickerPackCollectionInfoFlags.masks) {
|
if flags.contains(StickerPackCollectionInfoFlags.isMasks) {
|
||||||
rawValue |= StickerPackCollectionInfoFlags.masks.rawValue
|
rawValue |= StickerPackCollectionInfoFlags.isMasks.rawValue
|
||||||
}
|
}
|
||||||
|
if flags.contains(StickerPackCollectionInfoFlags.isOfficial) {
|
||||||
if flags.contains(StickerPackCollectionInfoFlags.official) {
|
rawValue |= StickerPackCollectionInfoFlags.isOfficial.rawValue
|
||||||
rawValue |= StickerPackCollectionInfoFlags.official.rawValue
|
}
|
||||||
|
if flags.contains(StickerPackCollectionInfoFlags.isAnimated) {
|
||||||
|
rawValue |= StickerPackCollectionInfoFlags.isAnimated.rawValue
|
||||||
}
|
}
|
||||||
|
|
||||||
self.rawValue = rawValue
|
self.rawValue = rawValue
|
||||||
}
|
}
|
||||||
|
|
||||||
public static let masks = StickerPackCollectionInfoFlags(rawValue: 1)
|
public static let isMasks = StickerPackCollectionInfoFlags(rawValue: 1 << 0)
|
||||||
public static let official = StickerPackCollectionInfoFlags(rawValue: 2)
|
public static let isOfficial = StickerPackCollectionInfoFlags(rawValue: 1 << 1)
|
||||||
|
public static let isAnimated = StickerPackCollectionInfoFlags(rawValue: 1 << 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -183,10 +186,13 @@ extension StickerPackCollectionInfo {
|
|||||||
case let .stickerSet(flags, _, id, accessHash, title, shortName, thumb, thumbDcId, count, nHash):
|
case let .stickerSet(flags, _, id, accessHash, title, shortName, thumb, thumbDcId, count, nHash):
|
||||||
var setFlags: StickerPackCollectionInfoFlags = StickerPackCollectionInfoFlags()
|
var setFlags: StickerPackCollectionInfoFlags = StickerPackCollectionInfoFlags()
|
||||||
if (flags & (1 << 2)) != 0 {
|
if (flags & (1 << 2)) != 0 {
|
||||||
setFlags.insert(.official)
|
setFlags.insert(.isOfficial)
|
||||||
}
|
}
|
||||||
if (flags & (1 << 3)) != 0 {
|
if (flags & (1 << 3)) != 0 {
|
||||||
setFlags.insert(.masks)
|
setFlags.insert(.isMasks)
|
||||||
|
}
|
||||||
|
if (flags & (1 << 5)) != 0 {
|
||||||
|
setFlags.insert(.isAnimated)
|
||||||
}
|
}
|
||||||
|
|
||||||
var thumbnailRepresentation: TelegramMediaImageRepresentation?
|
var thumbnailRepresentation: TelegramMediaImageRepresentation?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user