Skip to content

Commit

Permalink
dismissPhotoPicker(withTLPHAssets:) delegate function rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
wade-hawk committed Mar 1, 2020
1 parent 2ecaa15 commit 69e87e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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 = '2.0.8'
s.version = '2.0.11'
s.summary = 'multiple phassets picker for iOS lib. like facebook'

# This description is used to generate tags and improve search results.
Expand Down
3 changes: 3 additions & 0 deletions TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import MobileCoreServices

public protocol TLPhotosPickerViewControllerDelegate: class {
func dismissPhotoPicker(withPHAssets: [PHAsset])
func dismissPhotoPicker(withTLPHAssets: [TLPHAsset])
func shouldDismissPhotoPicker(withTLPHAssets: [TLPHAsset]) -> Bool
func dismissComplete()
func photoPickerDidCancel()
Expand All @@ -25,6 +26,7 @@ public protocol TLPhotosPickerViewControllerDelegate: class {
extension TLPhotosPickerViewControllerDelegate {
public func deninedAuthoization() { }
public func dismissPhotoPicker(withPHAssets: [PHAsset]) { }
public func dismissPhotoPicker(withTLPHAssets: [TLPHAsset]) { }
public func shouldDismissPhotoPicker(withTLPHAssets: [TLPHAsset]) -> Bool { return true }
public func dismissComplete() { }
public func photoPickerDidCancel() { }
Expand Down Expand Up @@ -508,6 +510,7 @@ extension TLPhotosPickerViewController {
#else
self.delegate?.dismissPhotoPicker(withPHAssets: self.selectedAssets.flatMap{ $0.phAsset })
#endif
self.delegate?.dismissPhotoPicker(withTLPHAssets: self.selectedAssets)
shouldDismiss = self.delegate?.shouldDismissPhotoPicker(withTLPHAssets: self.selectedAssets) ?? true
self.completionWithTLPHAssets?(self.selectedAssets)
#if swift(>=4.1)
Expand Down

0 comments on commit 69e87e6

Please sign in to comment.