damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit fad0a6b7830017f6961624ce1bd5d9bfe00c9556
parent f5d74653684cc82ff721c605959339e713bcb420
Author: William Casarin <jb55@jb55.com>
Date:   Sat, 15 Apr 2023 10:21:35 -0700

PostView: remove ! unwrap for mediaToUpload

Diffstat:
Mdamus/Views/PostView.swift | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/damus/Views/PostView.swift b/damus/Views/PostView.swift @@ -264,8 +264,10 @@ struct PostView: View { } .alert("Confirm upload?", isPresented: $image_upload_confirm) { Button(NSLocalizedString("Upload", comment: "Button to proceed with uploading."), role: .none) { - self.handle_upload(media: mediaToUpload!) - self.attach_media = false + if let mediaToUpload { + self.handle_upload(media: mediaToUpload) + self.attach_media = false + } } Button(NSLocalizedString("Cancel", comment: "Button to cancel the upload."), role: .cancel) {} }