mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Fallback to webpage image instead of instant page if instant view album is empty
This commit is contained in:
parent
edb09cf389
commit
401b8c2922
@ -113,17 +113,7 @@ final class ChatMessageWebpageBubbleContentNode: ChatMessageBubbleContentNode {
|
||||
if let strongSelf = self, let item = strongSelf.item {
|
||||
if let webPage = strongSelf.webPage, case let .Loaded(content) = webPage.content {
|
||||
if let image = content.image, let instantPage = content.instantPage {
|
||||
var isGallery = false
|
||||
switch instantPageType(of: content) {
|
||||
case .album:
|
||||
let count = instantPageGalleryMedia(webpageId: webPage.webpageId, page: instantPage, galleryMedia: image).count
|
||||
if count > 1 {
|
||||
isGallery = true
|
||||
}
|
||||
default:
|
||||
break
|
||||
}
|
||||
if !isGallery {
|
||||
if instantPageType(of: content) != .album {
|
||||
item.controllerInteraction.openInstantPage(item.message, item.associatedData)
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user