mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Video Stickers Fixes
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user