add detailed error info

This commit is contained in:
Ryan Zhao 2023-07-24 15:52:08 +10:00
parent cd0e699bde
commit 114868ef16
1 changed files with 22 additions and 15 deletions

View File

@ -209,7 +209,12 @@ struct MessageInfoView: View {
}
if isMessageFailed {
let failureText: String = messageViewModel.mostRecentFailureText ?? "Message failed to send"
InfoBlock(title: "Error:") {
Text(failureText)
.font(.system(size: 16))
.foregroundColor(.red)
}
}
InfoBlock(title: "From:") {
@ -267,20 +272,22 @@ struct MessageInfoView: View {
)
// Actions
// ZStack {
// RoundedRectangle(cornerRadius: 8)
// VStack {
// ForEach(
// 0...(actions.count - 1),
// id: \.self
// ) { index in
// HStack {
// Image(uiImage: actions[index].icon!)
// Text(actions[index].title)
// }
// }
// }
// }
if !actions.isEmpty {
ZStack {
RoundedRectangle(cornerRadius: 8)
VStack {
ForEach(
0...(actions.count - 1),
id: \.self
) { index in
HStack {
Image(uiImage: actions[index].icon!)
Text(actions[index].title)
}
}
}
}
}
}
}
}