mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-05 05:51:42 +00:00
Open all document images in an external preview
This commit is contained in:
parent
692ed2844e
commit
443d0a0d95
@ -111,7 +111,7 @@ private func chatMessageGalleryControllerData(context: AccountContext, message:
|
|||||||
} else if let galleryMedia = galleryMedia {
|
} else if let galleryMedia = galleryMedia {
|
||||||
if let mapMedia = galleryMedia as? TelegramMediaMap {
|
if let mapMedia = galleryMedia as? TelegramMediaMap {
|
||||||
return .map(mapMedia)
|
return .map(mapMedia)
|
||||||
} else if let file = galleryMedia as? TelegramMediaFile, file.isSticker {
|
} else if let file = galleryMedia as? TelegramMediaFile, (file.isSticker || file.isAnimatedSticker) {
|
||||||
for attribute in file.attributes {
|
for attribute in file.attributes {
|
||||||
if case let .Sticker(_, reference, _) = attribute {
|
if case let .Sticker(_, reference, _) = attribute {
|
||||||
if let reference = reference {
|
if let reference = reference {
|
||||||
@ -153,7 +153,7 @@ private func chatMessageGalleryControllerData(context: AccountContext, message:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if !file.isVideo, !internalDocumentItemSupportsMimeType(file.mimeType, fileName: file.fileName) {
|
if !file.isVideo {
|
||||||
return .document(file)
|
return .document(file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user