Remove redundant remove failed sent message menu

This commit is contained in:
Stefan Ceriu
2024-06-28 10:26:24 +03:00
parent ab299ab3de
commit b7fcb76094
4 changed files with 324 additions and 130 deletions
@@ -110,11 +110,7 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
VStack(alignment: alignment, spacing: -3) {
messageBubble
.timelineItemAccessibility(timelineItem) {
if adjustedDeliveryStatus == .sendingFailed {
context.send(viewAction: .displayMessageSendingFailureAlert(itemID: timelineItem.id))
} else {
context.send(viewAction: .displayTimelineItemMenu(itemID: timelineItem.id))
}
context.send(viewAction: .displayTimelineItemMenu(itemID: timelineItem.id))
}
if !timelineItem.properties.reactions.isEmpty {
@@ -168,22 +164,10 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
timelineItem.bubbleSendInfoLayoutType
.layout {
contentWithReply
interactiveLocalizedSendInfo
layoutedLocalizedSendInfo
}
}
@ViewBuilder
var interactiveLocalizedSendInfo: some View {
if adjustedDeliveryStatus == .sendingFailed {
layoutedLocalizedSendInfo
.onTapGesture {
context.send(viewAction: .displayMessageSendingFailureAlert(itemID: timelineItem.id))
}
} else {
layoutedLocalizedSendInfo
}
}
@ViewBuilder
var layoutedLocalizedSendInfo: some View {
switch timelineItem.bubbleSendInfoLayoutType {