Skip to content
This repository was archived by the owner on May 3, 2021. It is now read-only.

Commit 9d08306

Browse files
committed
Fix an issue when DFImageMaximumSize wasn't working for PhotosKit
1 parent 3d843c4 commit 9d08306

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

DFImageManager/Source/PhotosKit/DFPhotosKitImageFetcher.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ - (NSOperation *)startOperationWithRequest:(DFImageRequest *)request progressHan
129129
resource = [((NSURL *)resource) df_assetLocalIdentifier];
130130
}
131131

132-
DFPhotosKitImageFetchOperation *operation = [[DFPhotosKitImageFetchOperation alloc] initWithResource:resource targetSize:request.targetSize contentMode:_PHContentModeForDFContentMode(request.contentMode) options:requestOptions];
132+
CGSize targetSize = CGSizeEqualToSize(DFImageMaximumSize, request.targetSize) ? PHImageManagerMaximumSize : request.targetSize;
133+
134+
DFPhotosKitImageFetchOperation *operation = [[DFPhotosKitImageFetchOperation alloc] initWithResource:resource targetSize:targetSize contentMode:_PHContentModeForDFContentMode(request.contentMode) options:requestOptions];
133135
DFPhotosKitImageFetchOperation *__weak weakOp = operation;
134136
[operation setCompletionBlock:^{
135137
if (completion) {

0 commit comments

Comments
 (0)