mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Various improvements
This commit is contained in:
parent
095b9d5058
commit
519370cb3c
19 changed files with 347 additions and 100 deletions
|
|
@ -98,6 +98,16 @@ public func chatMessageGalleryControllerData(context: AccountContext, chatLocati
|
|||
var galleryMedia: Media?
|
||||
var otherMedia: Media?
|
||||
var instantPageMedia: (TelegramMediaWebpage, [InstantPageGalleryEntry])?
|
||||
if message.media.isEmpty, let entities = message.textEntitiesAttribute?.entities, entities.count == 1, let firstEntity = entities.first, case let .CustomEmoji(_, fileId) = firstEntity.type, let file = message.associatedMedia[MediaId(namespace: Namespaces.Media.CloudFile, id: fileId)] as? TelegramMediaFile {
|
||||
for attribute in file.attributes {
|
||||
if case let .CustomEmoji(_, _, reference) = attribute {
|
||||
if let reference = reference {
|
||||
return .stickerPack(reference)
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
for media in message.media {
|
||||
if let action = media as? TelegramMediaAction {
|
||||
switch action.action {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue