Re-enable coloring of new name in name change events

This commit is contained in:
Tulir Asokan 2018-05-22 21:18:46 +03:00
parent 34359a0599
commit 4849ef08b8

View File

@ -145,7 +145,9 @@ func getMembershipEventContent(room *rooms.Room, evt *gomatrix.Event) (sender st
} else if displayname != prevDisplayname { } else if displayname != prevDisplayname {
sender = "---" sender = "---"
text = tstring.NewColorTString(fmt.Sprintf("%s changed their display name to %s.", prevDisplayname, displayname), tcell.ColorGreen) 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 return
} }