Skip to content

Commit

Permalink
Display duration when usedPrefetch enable.
Browse files Browse the repository at this point in the history
  • Loading branch information
tilltue committed Jan 31, 2018
1 parent 08bfbcf commit e4b7649
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,10 @@ extension TLPhotosPickerViewController: UICollectionViewDelegate,UICollectionVie
DispatchQueue.main.async {
if self.requestIds[indexPath] != nil {
cell?.imageView?.image = image
if self.allowedVideo {
cell?.durationView?.isHidden = asset.type != .video
cell?.duration = asset.type == .video ? phAsset.duration : nil
}
if complete {
self.requestIds.removeValue(forKey: indexPath)
}
Expand Down

0 comments on commit e4b7649

Please sign in to comment.