Skip to content

Commit

Permalink
A comment is corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailGasanov committed Jul 24, 2019
1 parent 2a0f590 commit 5214c43
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ final class PhotosInputCellProvider: PhotosInputCellProviderProtocol {
var requestId: Int32 = -1
let request = self.dataProvider.requestPreviewImage(at: index, targetSize: targetSize) { [weak self, weak cell] result in
guard let sSelf = self, let sCell = cell else { return }
// We can get here even afer calling cancelPreviewImageRequest (looks liek a race condition in PHImageManager)
// We can get here even after calling cancelPreviewImageRequest (looks like a race condition in PHImageManager)
// Also, according to PHImageManager's documentation, this block can be called several times: we may receive an image with a low quality and then receive an update with a better one
// This can also be called before returning from requestPreviewImage (synchronously) if the image is cached by PHImageManager
let imageIsForThisCell = imageProvidedSynchronously || sSelf.previewRequests[sCell.hash]?.requestId == requestId
Expand Down

0 comments on commit 5214c43

Please sign in to comment.