mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Merge commit 'e9a4a9347a1000386e148a490a28d601c3bd0db3' into bazel
This commit is contained in:
@@ -13,6 +13,7 @@ public enum StickerPackReference: PostboxCoding, Hashable, Equatable {
|
||||
case id(id: Int64, accessHash: Int64)
|
||||
case name(String)
|
||||
case animatedEmoji
|
||||
case dice
|
||||
|
||||
public init(decoder: PostboxDecoder) {
|
||||
switch decoder.decodeInt32ForKey("r", orElse: 0) {
|
||||
@@ -22,6 +23,8 @@ public enum StickerPackReference: PostboxCoding, Hashable, Equatable {
|
||||
self = .name(decoder.decodeStringForKey("n", orElse: ""))
|
||||
case 2:
|
||||
self = .animatedEmoji
|
||||
case 3:
|
||||
self = .dice
|
||||
default:
|
||||
self = .name("")
|
||||
assertionFailure()
|
||||
@@ -39,6 +42,8 @@ public enum StickerPackReference: PostboxCoding, Hashable, Equatable {
|
||||
encoder.encodeString(name, forKey: "n")
|
||||
case .animatedEmoji:
|
||||
encoder.encodeInt32(2, forKey: "r")
|
||||
case .dice:
|
||||
encoder.encodeInt32(3, forKey: "r")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +67,12 @@ public enum StickerPackReference: PostboxCoding, Hashable, Equatable {
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case .dice:
|
||||
if case .dice = rhs {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user