some qol stuff
This commit is contained in:
+10
-5
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user