Fix build

This commit is contained in:
Ilya Laktyushin 2019-12-16 15:49:33 +04:00
parent 4d0ebd5f77
commit e5cd999eda

View File

@ -69,6 +69,7 @@ extension TelegramWallpaper: Codable {
var color: Int32?
var bottomColor: Int32?
var intensity: Int32?
var rotation: Int32?
if !components.isEmpty {
slug = components[0]
@ -101,7 +102,7 @@ extension TelegramWallpaper: Codable {
}
}
if let slug = slug {
self = .file(id: 0, accessHash: 0, isCreator: false, isDefault: false, isPattern: color != nil, isDark: false, slug: slug, file: TelegramMediaFile(fileId: MediaId(namespace: 0, id: 0), partialReference: nil, resource: LocalFileMediaResource(fileId: 0), previewRepresentations: [], immediateThumbnailData: nil, mimeType: "", size: nil, attributes: []), settings: WallpaperSettings(blur: blur, motion: motion, color: color, bottomColor: bottomColor, intensity: intensity))
self = .file(id: 0, accessHash: 0, isCreator: false, isDefault: false, isPattern: color != nil, isDark: false, slug: slug, file: TelegramMediaFile(fileId: MediaId(namespace: 0, id: 0), partialReference: nil, resource: LocalFileMediaResource(fileId: 0), previewRepresentations: [], immediateThumbnailData: nil, mimeType: "", size: nil, attributes: []), settings: WallpaperSettings(blur: blur, motion: motion, color: color, bottomColor: bottomColor, intensity: intensity, rotation: rotation))
} else {
throw PresentationThemeDecodingError.generic
}