PostView: remove ! unwrap for mediaToUpload
This commit is contained in:
@@ -264,8 +264,10 @@ struct PostView: View {
|
|||||||
}
|
}
|
||||||
.alert("Confirm upload?", isPresented: $image_upload_confirm) {
|
.alert("Confirm upload?", isPresented: $image_upload_confirm) {
|
||||||
Button(NSLocalizedString("Upload", comment: "Button to proceed with uploading."), role: .none) {
|
Button(NSLocalizedString("Upload", comment: "Button to proceed with uploading."), role: .none) {
|
||||||
self.handle_upload(media: mediaToUpload!)
|
if let mediaToUpload {
|
||||||
self.attach_media = false
|
self.handle_upload(media: mediaToUpload)
|
||||||
|
self.attach_media = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Button(NSLocalizedString("Cancel", comment: "Button to cancel the upload."), role: .cancel) {}
|
Button(NSLocalizedString("Cancel", comment: "Button to cancel the upload."), role: .cancel) {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user