mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Story covers
This commit is contained in:
@@ -701,7 +701,7 @@ func inputDocumentAttributesFromFileAttributes(_ fileAttributes: [TelegramMediaF
|
||||
attributes.append(.documentAttributeSticker(flags: flags, alt: displayText, stickerset: stickerSet, maskCoords: inputMaskCoords))
|
||||
case .HasLinkedStickers:
|
||||
attributes.append(.documentAttributeHasStickers)
|
||||
case let .Video(duration, size, videoFlags, preloadSize):
|
||||
case let .Video(duration, size, videoFlags, preloadSize, coverTime):
|
||||
var flags: Int32 = 0
|
||||
if videoFlags.contains(.instantRoundVideo) {
|
||||
flags |= (1 << 0)
|
||||
@@ -715,8 +715,10 @@ func inputDocumentAttributesFromFileAttributes(_ fileAttributes: [TelegramMediaF
|
||||
if videoFlags.contains(.isSilent) {
|
||||
flags |= (1 << 3)
|
||||
}
|
||||
|
||||
attributes.append(.documentAttributeVideo(flags: flags, duration: duration, w: Int32(size.width), h: Int32(size.height), preloadPrefixSize: preloadSize, videoStartTs: nil))
|
||||
if let coverTime = coverTime, coverTime > 0.0 {
|
||||
flags |= (1 << 4)
|
||||
}
|
||||
attributes.append(.documentAttributeVideo(flags: flags, duration: duration, w: Int32(size.width), h: Int32(size.height), preloadPrefixSize: preloadSize, videoStartTs: coverTime))
|
||||
case let .Audio(isVoice, duration, title, performer, waveform):
|
||||
var flags: Int32 = 0
|
||||
if isVoice {
|
||||
@@ -786,7 +788,7 @@ public func statsCategoryForFileWithAttributes(_ attributes: [TelegramMediaFileA
|
||||
} else {
|
||||
return .audio
|
||||
}
|
||||
case let .Video(_, _, flags, _):
|
||||
case let .Video(_, _, flags, _, _):
|
||||
if flags.contains(TelegramMediaVideoFlags.instantRoundVideo) {
|
||||
return .voiceMessages
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user