Add comprehensive logging and force UI updates for delivery status

- Add logging to track what delivery status is shown in UI
- Add logging when green/blue checkmarks appear
- Force complete dictionary reassignment to trigger SwiftUI updates
- Add diagnostics to understand why blue checkmarks aren't showing
This commit is contained in:
jack
2025-07-06 22:26:56 +02:00
parent c9a594d0b5
commit ab5af1546d
2 changed files with 25 additions and 8 deletions
+7
View File
@@ -494,6 +494,7 @@ struct ContentView: View {
// Delivery status indicator for private messages
if message.isPrivate && message.sender == viewModel.nickname,
let status = message.deliveryStatus {
let _ = print("[UI] Message \(message.id) has status: \(status)")
DeliveryStatusView(status: status, colorScheme: colorScheme)
.padding(.leading, 4)
.alignmentGuide(.firstTextBaseline) { _ in 12 }
@@ -1104,6 +1105,9 @@ struct DeliveryStatusView: View {
}
.foregroundColor(textColor.opacity(0.8))
.help("Delivered to \(nickname)")
.onAppear {
print("[UI] Showing GREEN checkmarks for delivered status to \(nickname)")
}
case .read(let nickname, _):
HStack(spacing: -2) {
@@ -1114,6 +1118,9 @@ struct DeliveryStatusView: View {
}
.foregroundColor(Color.blue)
.help("Read by \(nickname)")
.onAppear {
print("[UI] Showing BLUE checkmarks for read status by \(nickname)")
}
case .failed(let reason):
Image(systemName: "exclamationmark.triangle")