mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
[WIP] Serialization
This commit is contained in:
@@ -2,7 +2,6 @@ import Foundation
|
||||
import Postbox
|
||||
import TelegramApi
|
||||
|
||||
|
||||
func dimensionsForFileAttributes(_ attributes: [TelegramMediaFileAttribute]) -> PixelDimensions? {
|
||||
for attribute in attributes {
|
||||
switch attribute {
|
||||
@@ -183,7 +182,7 @@ func telegramMediaFileFromApiDocument(_ document: Api.Document, altDocuments: [A
|
||||
}
|
||||
}
|
||||
|
||||
var alternativeRepresentations: [Media] = []
|
||||
var alternativeRepresentations: [TelegramMediaFile] = []
|
||||
if let altDocuments {
|
||||
alternativeRepresentations = altDocuments.compactMap { telegramMediaFileFromApiDocument($0, altDocuments: []) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user