Added Share button in status context menu (#37)

This commit is contained in:
Jan Schneider 2023-01-07 16:07:10 +01:00 committed by GitHub
parent 75cd23df5d
commit 2414c8fd10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,7 +37,13 @@ struct StatusRowContextMenu: View {
Label("Quote this post", systemImage: "quote.bubble")
}
}
if let url = viewModel.status.reblog?.url ?? viewModel.status.url {
ShareLink(item: url) {
Label("Share this post", systemImage: "square.and.arrow.up")
}
}
if let url = viewModel.status.reblog?.url ?? viewModel.status.url {
Button { UIApplication.shared.open(url) } label: {
Label("View in Browser", systemImage: "safari")