Fix status menu on Catalyst
This commit is contained in:
parent
d2014d3aec
commit
ba071eb4c8
|
@ -228,14 +228,43 @@ struct StatusRowContextMenu: View {
|
||||||
Label("account.action.mute", systemImage: "speaker.slash")
|
Label("account.action.mute", systemImage: "speaker.slash")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if targetEnvironment(macCatalyst)
|
||||||
|
accountContactMenuItems
|
||||||
|
#else
|
||||||
ControlGroup {
|
ControlGroup {
|
||||||
|
accountContactMenuItems
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Section {
|
||||||
|
Button(role: .destructive) {
|
||||||
|
viewModel.routerPath.presentedSheet = .report(status: viewModel.status.reblogAsAsStatus ?? viewModel.status)
|
||||||
|
} label: {
|
||||||
|
Label("status.action.report", systemImage: "exclamationmark.bubble")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ViewBuilder
|
||||||
|
private var accountContactMenuItems: some View {
|
||||||
Button {
|
Button {
|
||||||
|
#if targetEnvironment(macCatalyst) || os(visionOS)
|
||||||
|
openWindow(value: WindowDestinationEditor.mentionStatusEditor(account: viewModel.status.reblog?.account ?? viewModel.status.account, visibility: .pub))
|
||||||
|
#else
|
||||||
viewModel.routerPath.presentedSheet = .mentionStatusEditor(account: viewModel.status.reblog?.account ?? viewModel.status.account, visibility: .pub)
|
viewModel.routerPath.presentedSheet = .mentionStatusEditor(account: viewModel.status.reblog?.account ?? viewModel.status.account, visibility: .pub)
|
||||||
|
#endif
|
||||||
} label: {
|
} label: {
|
||||||
Label("status.action.mention", systemImage: "at")
|
Label("status.action.mention", systemImage: "at")
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
#if targetEnvironment(macCatalyst) || os(visionOS)
|
||||||
|
openWindow(value: WindowDestinationEditor.mentionStatusEditor(account: viewModel.status.reblog?.account ?? viewModel.status.account, visibility: .direct))
|
||||||
|
#else
|
||||||
viewModel.routerPath.presentedSheet = .mentionStatusEditor(account: viewModel.status.reblog?.account ?? viewModel.status.account, visibility: .direct)
|
viewModel.routerPath.presentedSheet = .mentionStatusEditor(account: viewModel.status.reblog?.account ?? viewModel.status.account, visibility: .direct)
|
||||||
|
#endif
|
||||||
} label: {
|
} label: {
|
||||||
Label("status.action.message", systemImage: "tray.full")
|
Label("status.action.message", systemImage: "tray.full")
|
||||||
}
|
}
|
||||||
|
@ -267,17 +296,6 @@ struct StatusRowContextMenu: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
Section {
|
|
||||||
Button(role: .destructive) {
|
|
||||||
viewModel.routerPath.presentedSheet = .report(status: viewModel.status.reblogAsAsStatus ?? viewModel.status)
|
|
||||||
} label: {
|
|
||||||
Label("status.action.report", systemImage: "exclamationmark.bubble")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ActivityView: UIViewControllerRepresentable {
|
struct ActivityView: UIViewControllerRepresentable {
|
||||||
|
|
Loading…
Reference in New Issue