diff --git a/submodules/PhotoResources/Sources/PhotoResources.swift b/submodules/PhotoResources/Sources/PhotoResources.swift index b8e3aa46fd..4980951cd6 100644 --- a/submodules/PhotoResources/Sources/PhotoResources.swift +++ b/submodules/PhotoResources/Sources/PhotoResources.swift @@ -32,9 +32,9 @@ public func largestRepresentationForPhoto(_ photo: TelegramMediaImage) -> Telegr private let progressiveRangeMap: [(Int, [Int])] = [ (100, [0]), - (400, [2]), - (600, [4, 5]), - (Int(Int32.max), [4, 5, 8, 9]) + (400, [1]), + (600, [2, 3]), + (Int(Int32.max), [2, 3, 4]) ] public func representationFetchRangeForDisplayAtSize(representation: TelegramMediaImageRepresentation, dimension: Int) -> Range? { @@ -52,7 +52,7 @@ public func representationFetchRangeForDisplayAtSize(representation: TelegramMed } public func chatMessagePhotoDatas(postbox: Postbox, photoReference: ImageMediaReference, fullRepresentationSize: CGSize = CGSize(width: 1280.0, height: 1280.0), autoFetchFullSize: Bool = false, tryAdditionalRepresentations: Bool = false, synchronousLoad: Bool = false, useMiniThumbnailIfAvailable: Bool = false) -> Signal, NoError> { - if let progressiveRepresentation = progressiveImageRepresentation(photoReference.media.representations), progressiveRepresentation.progressiveSizes.count == 10 { + if let progressiveRepresentation = progressiveImageRepresentation(photoReference.media.representations), progressiveRepresentation.progressiveSizes.count == 5 { enum SizeSource { case miniThumbnail(data: Data) case image(size: Int)