mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Add user colors to channel group chats
This commit is contained in:
parent
6ed72b0a42
commit
e10c2e94b2
3 changed files with 3 additions and 3 deletions
|
|
@ -10,7 +10,7 @@ struct LastHeardText: View {
|
|||
let sixMonthsAgo = Calendar.current.date(byAdding: .month, value: -6, to: Date())
|
||||
var body: some View {
|
||||
if lastHeard != nil && lastHeard! >= sixMonthsAgo! {
|
||||
Text("heard")+Text(": \(lastHeard!, style: .relative) ")+Text("ago")
|
||||
Text("heard")+Text(" \(lastHeard!, style: .relative) ")+Text("ago")
|
||||
} else {
|
||||
Text("unknown.age")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ struct ChannelMessageList: View {
|
|||
HStack(alignment: .top) {
|
||||
if currentUser { Spacer(minLength: 50) }
|
||||
if !currentUser {
|
||||
CircleText(text: message.fromUser?.shortName ?? "????", color: currentUser ? .accentColor : Color(.gray), circleSize: 44, fontSize: 14)
|
||||
CircleText(text: message.fromUser?.shortName ?? "????", color: Color(UIColor(hex: UInt32(message.fromUser?.num ?? 0))), circleSize: 44, fontSize: 14, textColor: UIColor(hex: UInt32(message.fromUser?.num ?? 0)).isLight() ? .black : .white)
|
||||
.padding(.all, 5)
|
||||
.offset(y: -5)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ struct UserMessageList: View {
|
|||
HStack(alignment: .top) {
|
||||
if currentUser { Spacer(minLength: 50) }
|
||||
if !currentUser {
|
||||
CircleText(text: message.fromUser?.shortName ?? "????", color: currentUser ? .accentColor : Color(.gray))
|
||||
CircleText(text: message.fromUser?.shortName ?? "????", color: currentUser ? .accentColor : Color(.gray), circleSize: 44, fontSize: 14)
|
||||
.padding(.all, 5)
|
||||
.offset(y: -5)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue