mirror of
git://jb55.com/damus
synced 2024-09-30 00:40:45 +00:00
use camera controller in EditPictureControl
Modify EditPictureControl to use the CameraController exactly as PostView does. Lightning-address: kernelkind@getalby.com Signed-off-by: kernelkind <kernelkind@gmail.com> Link: 20240228033235.66935-3-kernelkind@gmail.com Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
6de44223f2
commit
556a5bcf4d
@ -60,18 +60,9 @@ struct EditPictureControl: View {
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: $show_camera) {
|
||||
|
||||
MediaPicker(image_upload_confirm: $image_upload_confirm, imagesOnly: true) { media in
|
||||
self.preUploadedMedia = media
|
||||
}
|
||||
.alert(NSLocalizedString("Are you sure you want to upload this image?", comment: "Alert message asking if the user wants to upload an image."), isPresented: $image_upload_confirm) {
|
||||
Button(NSLocalizedString("Upload", comment: "Button to proceed with uploading."), role: .none) {
|
||||
if let mediaToUpload = generateMediaUpload(preUploadedMedia) {
|
||||
self.handle_upload(media: mediaToUpload)
|
||||
self.show_camera = false
|
||||
}
|
||||
}
|
||||
Button(NSLocalizedString("Cancel", comment: "Button to cancel the upload."), role: .cancel) {}
|
||||
CameraController(uploader: uploader) {
|
||||
self.show_camera = false
|
||||
self.show_library = true
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: $show_library) {
|
||||
|
Loading…
Reference in New Issue
Block a user