Add edit indicator in modern display mode

This commit is contained in:
FIGBERT 2023-04-06 23:14:02 -04:00
parent 7a83ebd7f4
commit b9b363e686
No known key found for this signature in database
GPG key ID: 67F1598D607A844B

View file

@ -714,6 +714,12 @@ func (view *MessageView) Draw(screen mauview.Screen) {
messageX+len(username)+3, line, view.width()-len(username)-3,
boldStyle.Foreground(msg.TimestampColor()),
)
if msg.Edited {
widget.WriteLine(screen, mauview.AlignLeft, " "+string(tcell.RuneBullet)+" ",
messageX+len(username)+3+len(msg.FormatTime()), line, 3, boldStyle)
widget.WriteLine(screen, mauview.AlignLeft, "Edited",
messageX+len(username)+len(msg.FormatTime())+6, line, 6, boldStyle.Foreground(tcell.ColorDarkRed))
}
}
msg.Draw(mauview.NewProxyScreen(screen, messageX, line+offset, view.width()-messageX, msg.Height(header)), header)
line += msg.Height(header)