parent
f5ac2616ad
commit
02e3417c27
|
@ -46,6 +46,8 @@ struct ComposeAttachmentRow: View {
|
||||||
Label("Delete", systemImage: "trash")
|
Label("Delete", systemImage: "trash")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} previewIfAvailable: {
|
||||||
|
ComposeAttachmentImage(attachment: attachment, fullSize: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch mode {
|
switch mode {
|
||||||
|
@ -151,6 +153,17 @@ extension ComposeAttachmentRow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private extension View {
|
||||||
|
@ViewBuilder
|
||||||
|
func contextMenu<M: View, P: View>(@ViewBuilder menuItems: () -> M, @ViewBuilder previewIfAvailable preview: () -> P) -> some View {
|
||||||
|
if #available(iOS 16.0, *) {
|
||||||
|
self.contextMenu(menuItems: menuItems, preview: preview)
|
||||||
|
} else {
|
||||||
|
self.contextMenu(menuItems: menuItems)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//struct ComposeAttachmentRow_Previews: PreviewProvider {
|
//struct ComposeAttachmentRow_Previews: PreviewProvider {
|
||||||
// static var previews: some View {
|
// static var previews: some View {
|
||||||
// ComposeAttachmentRow()
|
// ComposeAttachmentRow()
|
||||||
|
|
Loading…
Reference in New Issue