Fixes #2842, fixes #2841 - Adopt new message sending queue API

- automatically retry failed requests as soon as the network is availble again
- remove manual retry options
This commit is contained in:
Stefan Ceriu
2024-05-28 10:17:13 +03:00
committed by Stefan Ceriu
parent 53fc5df55b
commit 6c1647b851
28 changed files with 827 additions and 606 deletions
@@ -110,9 +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 {
if adjustedDeliveryStatus != .sendingFailed {
context.send(viewAction: .displayTimelineItemMenu(itemID: timelineItem.id))
}
}
@@ -171,22 +169,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 {
@@ -55,9 +55,6 @@ struct TimelineItemStatusView: View {
if style == .plain {
CompoundIcon(\.error, size: .xSmall, relativeTo: .compound.bodyMD)
.foregroundColor(.compound.iconCriticalPrimary)
.onTapGesture {
context.send(viewAction: .displayMessageSendingFailureAlert(itemID: timelineItem.id))
}
.accessibilityLabel(L10n.commonSendingFailed)
.accessibilityHint(L10n.actionTapForOptions)
}