Skip to content

Commit

Permalink
Fixed #275
Browse files Browse the repository at this point in the history
  • Loading branch information
tilltue committed Jul 21, 2020
1 parent 9c11815 commit c4588de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ extension TLPhotosPickerViewController: UIImagePickerControllerDelegate, UINavig
let newAssetRequest = PHAssetChangeRequest.creationRequestForAsset(from: image)
placeholderAsset = newAssetRequest.placeholderForCreatedAsset
}, completionHandler: { [weak self] (success, error) in
guard self?.maxCheck() == false else { return }
if success, let `self` = self, let identifier = placeholderAsset?.localIdentifier {
guard let asset = PHAsset.fetchAssets(withLocalIdentifiers: [identifier], options: nil).firstObject else { return }
var result = TLPHAsset(asset: asset)
Expand All @@ -656,6 +657,7 @@ extension TLPhotosPickerViewController: UIImagePickerControllerDelegate, UINavig
let newAssetRequest = PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: info[.mediaURL] as! URL)
placeholderAsset = newAssetRequest?.placeholderForCreatedAsset
}) { [weak self] (sucess, error) in
guard self?.maxCheck() == false else { return }
if sucess, let `self` = self, let identifier = placeholderAsset?.localIdentifier {
guard let asset = PHAsset.fetchAssets(withLocalIdentifiers: [identifier], options: nil).firstObject else { return }
var result = TLPHAsset(asset: asset)
Expand Down

0 comments on commit c4588de

Please sign in to comment.