some qol stuff

This commit is contained in:
2026-05-10 14:46:19 +01:00
parent 1aa14f9fd5
commit 98cd855349
8 changed files with 66 additions and 6 deletions
+10 -5
View File
@@ -149,6 +149,14 @@ func generateMessageWidget(p stanza.Packet) gtk.Widgetter {
m.Get(&ocu)
id := JidMustParse(m.From).Resource
custom_nick, ok := loadedConfig.CustomNicks[ocu.ID]
if ok {
id = custom_nick
}
if id == "" {
id = JidMustParse(m.From).Bare()
}
if loadedConfig.CompactMode {
al := gtk.NewLabel(id)
@@ -174,11 +182,8 @@ func generateMessageWidget(p stanza.Packet) gtk.Widgetter {
} else {
authorBox := gtk.NewBox(gtk.OrientationHorizontal, 10)
contentBox := gtk.NewBox(gtk.OrientationHorizontal, 0)
n := JidMustParse(m.From).Resource
if n == "" {
n = JidMustParse(m.From).Resource
}
al := gtk.NewLabel(n)
al := gtk.NewLabel(id)
al.AddCSSClass("author")
al.SetSelectable(true)