Skip to content

Commit

Permalink
Turned pickerUploadedFiles(picker:, responses:) into an optional prot…
Browse files Browse the repository at this point in the history
…ocol requirement.
  • Loading branch information
rnine committed Nov 3, 2021
1 parent 010c8c0 commit b8a68ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ private extension SourceTableViewController {

if !responses.isEmpty {
DispatchQueue.main.async {
picker.pickerDelegate?.pickerUploadedFiles(picker: picker, responses: responses)
picker.pickerDelegate?.pickerUploadedFiles?(picker: picker, responses: responses)

// Remove any temporary files after returning from delegate call.
let urls = responses.compactMap { $0.context as? URL }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ import UIKit
/// Called when the picker finishes picking files originating from the local device.
@objc func pickerPickedFiles(picker: PickerNavigationController, fileURLs: [URL])

/// Called when the picker finishes uploading files originating from the local device to the storage destination.
@objc func pickerUploadedFiles(picker: PickerNavigationController, responses: [JSONResponse])

/// Called when the picker finishes storing a file originating from a cloud source into the storage destination.
@objc func pickerStoredFile(picker: PickerNavigationController, response: StoreResponse)

/// Called when the picker reports progress during a file or set of files being uploaded.
/// Called when the picker finishes uploading files originating from the local device to the storage destination. Optional.
@objc optional func pickerUploadedFiles(picker: PickerNavigationController, responses: [JSONResponse])

/// Called when the picker reports progress during a file or set of files being uploaded. Optional.
@objc optional func pickerReportedUploadProgress(picker: PickerNavigationController, progress: Float)

/// Called after the picker was dismissed.
/// Called after the picker was dismissed. Optional.
@objc optional func pickerWasDismissed(picker: PickerNavigationController)
}

Expand Down

0 comments on commit b8a68ee

Please sign in to comment.