This PR implements the system photos picker for the Gravatar picker in SwiftUI.
Notes:
As a demo, I have implemented both add image buttons: in-grid and bottom CTA.
We are only using the UIKit photos picker, and not the new SwiftUI PhotosPicker, since the later only supports Photo Library, doesn't support cropping, and the selection seems bugged (made for multi-select only, though it can return only one).
The interface of the ImagePickerView is similar to the one of SwiftUI's PhotosPicker, to facilitate a replacement in the future.
After the selected image is uploaded to the backend, we add the local image to the cache, to avoid an unnecessary download.
Not included on this PR:
Selector between Camera and Library.
Possibility to inject custom images picker / cropper. (do we want this in the first release?)
Description
This PR implements the system photos picker for the Gravatar picker in SwiftUI.
Notes:
ImagePickerView
is similar to the one of SwiftUI's PhotosPicker, to facilitate a replacement in the future.Not included on this PR:
Testing Steps