Various improvements

This commit is contained in:
Ilya Laktyushin
2020-02-11 10:34:00 +04:00
parent fd867a92c7
commit f2ca7b00ef
178 changed files with 16610 additions and 4271 deletions

View File

@@ -19,6 +19,7 @@ public enum MessageTextEntityType: Equatable {
case Strikethrough
case BlockQuote
case Underline
case BankCard
case Custom(type: CustomEntityType)
}
@@ -65,6 +66,8 @@ public struct MessageTextEntity: PostboxCoding, Equatable {
self.type = .BlockQuote
case 15:
self.type = .Underline
case 16:
self.type = .BankCard
case Int32.max:
self.type = .Custom(type: decoder.decodeInt32ForKey("type", orElse: 0))
default:
@@ -110,6 +113,8 @@ public struct MessageTextEntity: PostboxCoding, Equatable {
encoder.encodeInt32(14, forKey: "_rawValue")
case .Underline:
encoder.encodeInt32(15, forKey: "_rawValue")
case .BankCard:
encoder.encodeInt32(16, forKey: "_rawValue")
case let .Custom(type):
encoder.encodeInt32(Int32.max, forKey: "_rawValue")
encoder.encodeInt32(type, forKey: "type")