mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Video Stickers Fixes
This commit is contained in:
parent
8b645037a6
commit
26f6e04fb3
3 changed files with 106 additions and 29 deletions
|
|
@ -117,6 +117,7 @@ public func mediaContentKind(_ media: EngineMedia, message: EngineMessage? = nil
|
|||
return .image
|
||||
case let .file(file):
|
||||
var fileName: String = ""
|
||||
var isAnimation = false
|
||||
for attribute in file.attributes {
|
||||
switch attribute {
|
||||
case let .Sticker(text, _, _):
|
||||
|
|
@ -137,7 +138,7 @@ public func mediaContentKind(_ media: EngineMedia, message: EngineMessage? = nil
|
|||
}
|
||||
case let .Video(_, _, flags):
|
||||
if file.isAnimated {
|
||||
return .animation
|
||||
isAnimation = true
|
||||
} else {
|
||||
if flags.contains(.instantRoundVideo) {
|
||||
return .videoMessage
|
||||
|
|
@ -149,7 +150,10 @@ public func mediaContentKind(_ media: EngineMedia, message: EngineMessage? = nil
|
|||
break
|
||||
}
|
||||
}
|
||||
if file.isAnimatedSticker {
|
||||
if isAnimation {
|
||||
return .animation
|
||||
}
|
||||
if file.isVideoSticker || file.isAnimatedSticker {
|
||||
return .sticker("")
|
||||
}
|
||||
return .file(fileName)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue