mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Initial downloads list implementation
This commit is contained in:
@@ -7,6 +7,17 @@ protocol TelegramCloudMediaResource: TelegramMediaResource {
|
||||
func apiInputLocation(fileReference: Data?) -> Api.InputFileLocation?
|
||||
}
|
||||
|
||||
public func extractMediaResourceDebugInfo(resource: MediaResource) -> String? {
|
||||
if let resource = resource as? TelegramCloudMediaResource {
|
||||
guard let inputLocation = resource.apiInputLocation(fileReference: nil) else {
|
||||
return nil
|
||||
}
|
||||
return String(describing: inputLocation)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
public protocol TelegramMultipartFetchableResource: TelegramMediaResource {
|
||||
var datacenterId: Int { get }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user