mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Download manager improvements
This commit is contained in:
@@ -260,7 +260,7 @@ private final class VisualMediaItemNode: ASDisplayNode {
|
||||
messageMediaFileCancelInteractiveFetch(context: self.context, messageId: message.id, file: file)
|
||||
case .Local:
|
||||
self.interaction.openMessage(message)
|
||||
case .Remote:
|
||||
case .Remote, .Paused:
|
||||
self.fetchDisposable.set(messageMediaFileInteractiveFetched(context: self.context, message: message, file: file, userInitiated: true).start())
|
||||
}
|
||||
}
|
||||
@@ -348,7 +348,7 @@ private final class VisualMediaItemNode: ASDisplayNode {
|
||||
statusState = .progress(color: .white, lineWidth: nil, value: CGFloat(adjustedProgress), cancelEnabled: true, animateRotation: true)
|
||||
case .Local:
|
||||
statusState = .none
|
||||
case .Remote:
|
||||
case .Remote, .Paused:
|
||||
statusState = .download(.white)
|
||||
}
|
||||
}
|
||||
@@ -382,7 +382,7 @@ private final class VisualMediaItemNode: ASDisplayNode {
|
||||
mediaDownloadState = .compactFetching(progress: 0.0)
|
||||
case .Local:
|
||||
badgeContent = .text(inset: 0.0, backgroundColor: mediaBadgeBackgroundColor, foregroundColor: mediaBadgeTextColor, text: NSAttributedString(string: durationString))
|
||||
case .Remote:
|
||||
case .Remote, .Paused:
|
||||
badgeContent = .text(inset: 12.0, backgroundColor: mediaBadgeBackgroundColor, foregroundColor: mediaBadgeTextColor, text: NSAttributedString(string: durationString))
|
||||
mediaDownloadState = .compactRemote
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user