Fix a bug on iOS 17 where you couldn't long press on a message. (#3567)

This commit is contained in:
Doug 2024-11-28 14:44:34 +00:00 committed by GitHub
parent 751be7b3a7
commit c598b6325d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,6 +124,12 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
var messageBubbleWithActions: some View {
messageBubble
.onTapGesture {
// We need a tap gesture before the long press gesture below, otherwise something
// on iOS 17 hijacks the long press and you can't bring up the context menu. This
// is no longer an issue on iOS 18. Note: it's fine for this to be empty, we handle
// specific taps within the timeline views themselves.
}
.longPressWithFeedback {
context.send(viewAction: .displayTimelineItemMenu(itemID: timelineItem.id))
}