Skip to content

Commit

Permalink
😴 Loading callback for photo updating
Browse files Browse the repository at this point in the history
  • Loading branch information
benlmyers committed Mar 5, 2022
1 parent 2e6738b commit 2966adf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/EasyFirebase/Services/Auth/EasyUser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,9 @@ public extension EasyUser {
- parameter type: The type of the user.
- parameter completion: The completion handler.
*/
func updatePhoto<T>(with data: Data, ofUserType type: T.Type, completion: @escaping (Error?) -> Void = { _ in }) where T: EasyUser {
func updatePhoto<T>(with data: Data, ofUserType type: T.Type, progress: @escaping (Double) -> Void = { _ in }, completion: @escaping (Error?) -> Void = { _ in }) where T: EasyUser {
guard assertAuthMatches() else { return }
EasyStorage.put(data, to: StorageResource(id: id, folder: "Profile Images")) { [self] url in
EasyStorage.put(data, to: StorageResource(id: id, folder: "Profile Images"), progress: progress) { [self] url in
guard let url = url else { return }
updatePhoto(with: url, ofUserType: type, completion: completion)
}
Expand Down

0 comments on commit 2966adf

Please sign in to comment.