Cross post to alt

This commit is contained in:
Lumaa 2024-06-24 16:12:30 +02:00
parent 72f53302f9
commit e0833cebe8
1 changed files with 25 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import UniformTypeIdentifiers
struct PostMenu: View {
@Environment(UniversalNavigator.self) private var navigator
@Environment(AccountManager.self) private var accountManager
@Environment(\.openURL) private var openURL
@Environment(\.dismiss) private var dismiss
@Environment(\.colorScheme) private var colorScheme
@Environment(\.displayScale) private var displayScale
@ -40,6 +41,30 @@ struct PostMenu: View {
}
Divider()
Menu {
Button {
openURL(URL(string: AltClients.IvoryApp.createPost(status.reblogAsAsStatus?.content.asRawText ?? status.content.asRawText))!)
} label: {
Text(AltClients.IvoryApp.name)
}
Button {
openURL(URL(string: AltClients.ThreadsApp.createPost(status.reblogAsAsStatus?.content.asRawText ?? status.content.asRawText))!)
} label: {
Text(AltClients.ThreadsApp.name)
}
Button {
openURL(URL(string: AltClients.XApp.createPost(status.reblogAsAsStatus?.content.asRawText ?? status.content.asRawText))!)
} label: {
Text(AltClients.XApp.name)
}
} label: {
Label("status.cross-post.alts", systemImage: "shuffle")
}
Divider()
}
Menu {