File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
WireMessaging/Sources/WireMessagingUI
Resources/Localization/en.lproj
WireDrive/Components/AttachmentsCarousel Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 109109"conversation.channelHistory.fetchChannelHistoryDepthOptions.error" = "An error occurred while fetching channel history depth options.";
110110"conversation.channelHistory.updateHistoryDepth.error" = "An error occurred while updating channel history depth.";
111111"conversation.file.preview.open" = "Open preview";
112+ "conversation.draft.attachmentMenu.errorTitle" = "Unable to load file";
112113"conversation.draft.attachmentMenu.retry" = "Retry";
113114"conversation.draft.attachmentMenu.remove" = "Remove File";
114115
Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ private struct AttachmentsCarouselItemView: View {
6767 static let buttonCornerRadius : CGFloat = 24
6868 }
6969
70+ @State private var showErrorAlert = false
71+
7072 let item : AttachmentsCarouselItem
7173 let onTap : ( ) -> Void
7274 let onRemove : ( ) -> Void
@@ -83,7 +85,15 @@ private struct AttachmentsCarouselItemView: View {
8385 . padding ( . trailing, Constants . trailingPadding)
8486
8587 cornerButton
86- }
88+ } . alert (
89+ L10n . Localizable. Conversation. Draft. AttachmentMenu. errorTitle,
90+ isPresented: $showErrorAlert,
91+ actions: {
92+ Button ( L10n . Localizable. Conversation. Draft. AttachmentMenu. remove, action: { onRemove ( ) } )
93+ Button ( L10n . Localizable. Conversation. Draft. AttachmentMenu. retry, action: { onRetry ( ) } )
94+
95+ }
96+ )
8797 }
8898
8999 @ViewBuilder var content : some View {
@@ -119,9 +129,8 @@ private struct AttachmentsCarouselItemView: View {
119129 Spacer ( )
120130
121131 if item. state. isFailed {
122- Menu {
123- Button ( L10n . Localizable. Conversation. Draft. AttachmentMenu. retry, action: onRetry)
124- Button ( L10n . Localizable. Conversation. Draft. AttachmentMenu. remove, action: onRemove)
132+ Button {
133+ showErrorAlert = true
125134 } label: {
126135 Image ( systemName: " ellipsis.circle.fill " )
127136 . resizable ( )
You can’t perform that action at this time.
0 commit comments