From e4b76496a9c1d12842b975a8c0f1aee70d978f77 Mon Sep 17 00:00:00 2001 From: "wade.hawk" <junhyi.park@gmail.com> Date: Wed, 31 Jan 2018 23:11:06 +0900 Subject: [PATCH] Display duration when usedPrefetch enable. --- TLPhotoPicker/Classes/TLPhotosPickerViewController.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift b/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift index da97ba29..cb4496dd 100644 --- a/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift +++ b/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift @@ -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) }