aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-05-22 21:18:46 +0300
committerTulir Asokan <tulir@maunium.net>2018-05-22 21:18:46 +0300
commit4849ef08b861ee5886f879c320ee6e1d8169f139 (patch)
treec8a83ae2af12c550838a4dec23e05b405f5304bf /ui
parent34359a0599269ba8e1bf535b8dd8cfda0d72e687 (diff)
Re-enable coloring of new name in name change events
Diffstat (limited to 'ui')
-rw-r--r--ui/messages/parser/parser.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/messages/parser/parser.go b/ui/messages/parser/parser.go
index 1fb64c4..19c86e7 100644
--- a/ui/messages/parser/parser.go
+++ b/ui/messages/parser/parser.go
@@ -145,7 +145,9 @@ func getMembershipEventContent(room *rooms.Room, evt *gomatrix.Event) (sender st
} else if displayname != prevDisplayname {
sender = "---"
text = tstring.NewColorTString(fmt.Sprintf("%s changed their display name to %s.", prevDisplayname, displayname), tcell.ColorGreen)
- text.Colorize(0, len(prevDisplayname), widget.GetHashColor(*evt.StateKey))
+ color := widget.GetHashColor(*evt.StateKey)
+ text.Colorize(0, len(prevDisplayname), color)
+ text.Colorize(len(prevDisplayname) + len(" changed their display name to "), len(displayname), color)
}
return
}