This commit is contained in:
overtake 2019-04-23 12:59:03 +04:00
commit 5202080b65
2 changed files with 1 additions and 7 deletions

View File

@ -276,8 +276,6 @@ final class ChatHistoryPreloadManager {
switch index.entity {
case let .peer(peerId):
key = .messageOfInterestHole(location: .peer(peerId), namespace: Namespaces.Message.Cloud, count: 60)
/*case let .group(groupId):
key = .messageOfInterestHole(location: .group(groupId), namespace: Namespaces.Message.Cloud, count: 60)*/
}
view.disposable.set((self.postbox.combinedView(keys: [key])
|> deliverOn(self.queue)).start(next: { [weak self] next in

View File

@ -464,11 +464,7 @@ public class CloudDocumentMediaResource: TelegramCloudMediaResource, TelegramMul
}
func apiInputLocation(fileReference: Data?) -> Api.InputFileLocation? {
if let fileReference = fileReference {
return Api.InputFileLocation.inputDocumentFileLocation(id: self.fileId, accessHash: self.accessHash, fileReference: Buffer(data: fileReference), thumbSize: "")
} else {
return nil
}
return Api.InputFileLocation.inputDocumentFileLocation(id: self.fileId, accessHash: self.accessHash, fileReference: Buffer(data: fileReference ?? Data()), thumbSize: "")
}
public init(datacenterId: Int, fileId: Int64, accessHash: Int64, size: Int?, fileReference: Data?, fileName: String?) {