Fix some url broken on iOS

This commit is contained in:
Matte23 committed 2020-12-07 00:29:10 +01:00
1 parent 3aee0e9a6a
commit f5075f4da8
2 files changed
+2 -2

No files matched your search

@@ -33,7 +33,7 @@ struct AttachmentView: View {
Spacer()
Button(action: {
guard let url = URL(string: attachmentUrl) else { return }
guard let url = URL(string: attachmentUrl.addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!) else { return }
UIApplication.shared.open(url)
}) {
Image(systemName: "envelope.open")
@@ -50,7 +50,7 @@ struct CircularView: View {
if showDetail {
HStack {
Button(action: {
guard let url = URL(string: circular.url) else { return }
guard let url = URL(string: circular.url.addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!) else { return }
UIApplication.shared.open(url)
}) {
Image(systemName: "envelope.open")