no message

This commit is contained in:
overtake 2018-08-16 23:46:26 +03:00
parent e38551b534
commit cace41b10e
2 changed files with 9 additions and 9 deletions

View File

@ -9,7 +9,7 @@ import Foundation
import MtProtoKitDynamic import MtProtoKitDynamic
#endif #endif
public enum RequestEditMessageMedia { public enum RequestEditMessageMedia : Equatable {
case keep case keep
case update(AnyMediaReference) case update(AnyMediaReference)
} }

View File

@ -8,11 +8,11 @@ import SwiftSignalKit
#endif #endif
public enum TelegramWallpaper: OrderedItemListEntryContents, Equatable { public enum TelegramWallpaper: OrderedItemListEntryContents, Equatable {
//case none case none
case builtin case builtin
case color(Int32) case color(Int32)
case image([TelegramMediaImageRepresentation]) case image([TelegramMediaImageRepresentation])
//case custom(String) case custom(String)
public init(decoder: PostboxDecoder) { public init(decoder: PostboxDecoder) {
switch decoder.decodeInt32ForKey("v", orElse: 0) { switch decoder.decodeInt32ForKey("v", orElse: 0) {
case 0: case 0:
@ -21,10 +21,10 @@ public enum TelegramWallpaper: OrderedItemListEntryContents, Equatable {
self = .color(decoder.decodeInt32ForKey("c", orElse: 0)) self = .color(decoder.decodeInt32ForKey("c", orElse: 0))
case 2: case 2:
self = .image(decoder.decodeObjectArrayWithDecoderForKey("i")) self = .image(decoder.decodeObjectArrayWithDecoderForKey("i"))
/*case 3: case 3:
self = .none self = .none
case 4: case 4:
self = .custom(decoder.decodeStringForKey("p", orElse: ""))*/ self = .custom(decoder.decodeStringForKey("p", orElse: ""))
default: default:
assertionFailure() assertionFailure()
self = .color(0xffffff) self = .color(0xffffff)
@ -33,8 +33,8 @@ public enum TelegramWallpaper: OrderedItemListEntryContents, Equatable {
public var hasWallpaper: Bool { public var hasWallpaper: Bool {
switch self { switch self {
//case .none: case .none:
// return false return false
case .color: case .color:
return false return false
default: default:
@ -52,11 +52,11 @@ public enum TelegramWallpaper: OrderedItemListEntryContents, Equatable {
case let .image(representations): case let .image(representations):
encoder.encodeInt32(2, forKey: "v") encoder.encodeInt32(2, forKey: "v")
encoder.encodeObjectArray(representations, forKey: "i") encoder.encodeObjectArray(representations, forKey: "i")
/*case .none: case .none:
encoder.encodeInt32(3, forKey: "v") encoder.encodeInt32(3, forKey: "v")
case let .custom(path): case let .custom(path):
encoder.encodeInt32(4, forKey: "v") encoder.encodeInt32(4, forKey: "v")
encoder.encodeString(path, forKey: "p")*/ encoder.encodeString(path, forKey: "p")
} }
} }
} }