From 556a5bcf4d12b0ad7055b6b538195a9df51d1cb4 Mon Sep 17 00:00:00 2001 From: kernelkind Date: Tue, 27 Feb 2024 22:32:35 -0500 Subject: [PATCH] use camera controller in EditPictureControl Modify EditPictureControl to use the CameraController exactly as PostView does. Lightning-address: kernelkind@getalby.com Signed-off-by: kernelkind Link: 20240228033235.66935-3-kernelkind@gmail.com Signed-off-by: William Casarin --- damus/Views/Profile/EditPictureControl.swift | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/damus/Views/Profile/EditPictureControl.swift b/damus/Views/Profile/EditPictureControl.swift index c2bd5267..6fac4b88 100644 --- a/damus/Views/Profile/EditPictureControl.swift +++ b/damus/Views/Profile/EditPictureControl.swift @@ -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) {