mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 09:20:08 +00:00
premium effect
This commit is contained in:
parent
f38d77a985
commit
57d8635db9
@ -491,6 +491,19 @@ public final class TelegramMediaFile: Media, Equatable, Codable {
|
||||
return false
|
||||
}
|
||||
|
||||
public var premiumEffect: TelegramMediaFile.VideoThumbnail? {
|
||||
if let effect = self.videoThumbnails.first(where: { thumbnail in
|
||||
if let resource = thumbnail.resource as? CloudDocumentSizeMediaResource, resource.sizeSpec == "f" {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}) {
|
||||
return effect
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
public var isVideoSticker: Bool {
|
||||
if self.mimeType == "video/webm" {
|
||||
var hasSticker = false
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user