aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
}