mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Refactoring
This commit is contained in:
@@ -1103,12 +1103,12 @@ final class ChatMessageInteractiveMediaNode: ASDisplayNode, GalleryItemTransitio
|
||||
return
|
||||
}
|
||||
|
||||
let automaticDownload: Bool
|
||||
/*let automaticDownload: Bool
|
||||
if let autoDownload = self.automaticDownload, case .full = autoDownload {
|
||||
automaticDownload = true
|
||||
} else {
|
||||
automaticDownload = false
|
||||
}
|
||||
}*/
|
||||
|
||||
var secretBeginTimeAndTimeout: (Double?, Double)?
|
||||
let isSecretMedia = message.containsSecretMedia
|
||||
@@ -1391,10 +1391,7 @@ final class ChatMessageInteractiveMediaNode: ASDisplayNode, GalleryItemTransitio
|
||||
case .Remote:
|
||||
state = .download(messageTheme.mediaOverlayControlColors.foregroundColor)
|
||||
if let file = self.media as? TelegramMediaFile {
|
||||
if false, file.isAnimated && (!automaticDownload || !automaticPlayback) {
|
||||
let string = "\(gifTitle) " + dataSizeString(file.size ?? 0, formatting: formatting)
|
||||
badgeContent = .mediaDownload(backgroundColor: messageTheme.mediaDateAndStatusFillColor, foregroundColor: messageTheme.mediaDateAndStatusTextColor, duration: string, size: nil, muted: false, active: false)
|
||||
} else {
|
||||
do {
|
||||
let durationString = file.isAnimated ? gifTitle : stringForDuration(playerDuration > 0 ? playerDuration : (file.duration ?? 0), position: playerPosition)
|
||||
if wideLayout {
|
||||
if isMediaStreamable(message: message, media: file) {
|
||||
|
||||
Reference in New Issue
Block a user