Fix share URLs

This commit is contained in:
Arkadiusz Fal
2021-11-13 16:45:47 +01:00
parent 6328bfbfab
commit a70d4f3b38
5 changed files with 19 additions and 13 deletions

View File

@@ -14,7 +14,7 @@ struct VideoDetails: View {
@State private var confirmationShown = false
@State private var presentingAddToPlaylist = false
@State private var presentingShareSheet = false
@State private var shareURL = ""
@State private var shareURL: URL?
@State private var currentPage = Page.details
@@ -309,7 +309,9 @@ struct VideoDetails: View {
}
#if os(iOS)
.sheet(isPresented: $presentingShareSheet) {
ShareSheet(activityItems: [shareURL])
if let shareURL = shareURL {
ShareSheet(activityItems: [shareURL])
}
}
#endif
}