Skip to content

Commit

Permalink
merged #115
Browse files Browse the repository at this point in the history
  • Loading branch information
tilltue committed May 21, 2018
1 parent f00b580 commit 2870421
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion TLPhotoPicker.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'TLPhotoPicker'
s.version = '1.6.7'
s.version = '1.6.8'
s.summary = 'multiple phassets picker for iOS lib. like facebook'

# This description is used to generate tags and improve search results.
Expand Down
6 changes: 4 additions & 2 deletions TLPhotoPicker/Classes/TLPhotoCollectionViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ open class TLPhotoCollectionViewCell: UICollectionViewCell {
if self.configure.autoPlay == false { return }
if self.player == nil {
self.playerView?.playerLayer.player = nil
NotificationCenter.default.removeObserver(observer)
if let oberver = self.observer {
NotificationCenter.default.removeObserver(observer)
}
}else {
self.playerView?.playerLayer.player = self.player
observer = NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: self.player?.currentItem, queue: nil, using: { [weak self] (_) in
self.observer = NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: self.player?.currentItem, queue: nil, using: { [weak self] (_) in
DispatchQueue.main.async {
guard let `self` = self else { return }
self.player?.seek(to: kCMTimeZero)
Expand Down
1 change: 0 additions & 1 deletion TLPhotoPicker/Classes/TLPhotoLibrary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ extension TLPhotoLibrary {
let useCameraButton = configure.usedCameraButton
let options = getOption(configure: configure)

@discardableResult
func getAlbum(subType: PHAssetCollectionSubtype, result: inout [TLAssetsCollection]) {
let fetchCollection = PHAssetCollection.fetchAssetCollections(with: .album, subtype: subType, options: nil)
var collections = [PHAssetCollection]()
Expand Down
2 changes: 1 addition & 1 deletion TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ extension TLPhotosPickerViewController: UICollectionViewDelegate,UICollectionVie
print("not supported by the simulator.")
return
}else {
if let nibName = self.configure.cameraCellNibSet?.nibName {
if self.configure.cameraCellNibSet?.nibName != nil {
cell.selectedCell()
}else {
self.logDelegate?.selectedCameraCell(picker: self)
Expand Down

0 comments on commit 2870421

Please sign in to comment.