mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Various improvements
This commit is contained in:
@@ -674,7 +674,17 @@ public final class TelegramRootController: NavigationController, TelegramRootCon
|
||||
return nil
|
||||
}
|
||||
}
|
||||
media = .video(dimensions: dimensions, duration: duration, resource: resource, firstFrameFile: firstFrameFile, stickers: result.stickers, coverTime: values.coverImageTimestamp)
|
||||
|
||||
var coverTime: Double?
|
||||
if let coverImageTimestamp = values.coverImageTimestamp {
|
||||
if let trimRange = values.videoTrimRange {
|
||||
coverTime = coverImageTimestamp - trimRange.lowerBound
|
||||
} else {
|
||||
coverTime = coverImageTimestamp
|
||||
}
|
||||
}
|
||||
|
||||
media = .video(dimensions: dimensions, duration: duration, resource: resource, firstFrameFile: firstFrameFile, stickers: result.stickers, coverTime: coverTime)
|
||||
}
|
||||
default:
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user