From 940026b1eb2f423a4c3f5c24444f5710dae4e85c Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Fri, 26 Apr 2024 15:35:08 -0700 Subject: [PATCH] Show long name and userid in group messages, above the message like imessage. --- Meshtastic/Views/Messages/ChannelMessageList.swift | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Meshtastic/Views/Messages/ChannelMessageList.swift b/Meshtastic/Views/Messages/ChannelMessageList.swift index 8688eed4..add3dc84 100644 --- a/Meshtastic/Views/Messages/ChannelMessageList.swift +++ b/Meshtastic/Views/Messages/ChannelMessageList.swift @@ -43,17 +43,24 @@ struct ChannelMessageList: View { .padding(.trailing) } } - HStack(alignment: .top) { + HStack(alignment: .bottom) { if currentUser { Spacer(minLength: 50) } if !currentUser { CircleText(text: message.fromUser?.shortName ?? "?", color: Color(UIColor(hex: UInt32(message.fromUser?.num ?? 0))), circleSize: 44) .padding(.all, 5) - .offset(y: -5) + .offset(y: -10) } + VStack(alignment: currentUser ? .trailing : .leading) { let isDetectionSensorMessage = message.portNum == Int32(PortNum.detectionSensorApp.rawValue) + if !currentUser && message.fromUser != nil { + Text("\(message.fromUser?.longName ?? "unknown".localized ) (!\(message.fromUser?.userId ?? "?"))") + .font(.caption) + .foregroundColor(.gray) + } HStack { + MessageText( message: message, tapBackDestination: .channel(channel),