Show long name and userid in group messages, above the message like imessage.

This commit is contained in:
Garth Vander Houwen 2024-04-26 15:35:08 -07:00
parent 52dd086e09
commit 940026b1eb

View file

@ -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),