forked from shadowfacts/Tusker
Hide compose attachment menu when there are no actions
This commit is contained in:
parent
8c67828185
commit
988b9b4793
@ -41,17 +41,19 @@ private struct AttachmentOptionsMenu: View {
|
|||||||
@Binding var recognizingText: Bool
|
@Binding var recognizingText: Bool
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Menu {
|
if attachment.drawingData != nil || attachment.type == .image {
|
||||||
if attachment.drawingData != nil {
|
Menu {
|
||||||
EditDrawingButton(attachment: attachment)
|
if attachment.drawingData != nil {
|
||||||
} else if attachment.type == .image {
|
EditDrawingButton(attachment: attachment)
|
||||||
RecognizeTextButton(attachment: attachment, recognizingText: $recognizingText)
|
} else if attachment.type == .image {
|
||||||
|
RecognizeTextButton(attachment: attachment, recognizingText: $recognizingText)
|
||||||
|
}
|
||||||
|
} label: {
|
||||||
|
Label("Options", systemImage: "ellipsis.circle.fill")
|
||||||
}
|
}
|
||||||
} label: {
|
.buttonStyle(AttachmentOverlayButtonStyle())
|
||||||
Label("Options", systemImage: "ellipsis.circle.fill")
|
.padding([.top, .leading], 2)
|
||||||
}
|
}
|
||||||
.buttonStyle(AttachmentOverlayButtonStyle())
|
|
||||||
.padding([.top, .leading], 2)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user