This commit is contained in:
2026-08-08 13:54:20 +01:00
parent 0179d614b9
commit eebb6906c6
10 changed files with 141 additions and 85 deletions
+18 -16
View File
@@ -307,9 +307,9 @@ func generateMessageWidget(p stanza.Packet, blocked bool) (gtk.Widgetter, bool)
} else {
createIdenticon(m.From, false, im)
/*
im.SetPixelSize(40)
im.AddCSSClass("author_img")
authorBox.Append(im)
im.SetPixelSize(40)
im.AddCSSClass("author_img")
authorBox.Append(im)
*/
}
} else if m.Type == stanza.MessageTypeChat {
@@ -464,16 +464,18 @@ func getAvatar(j, hash string, i *gtk.Image) { // TODO: This function probably s
_, err = os.ReadFile(hash)
if err == nil {
/*
i, err = newImageFromPath(hash)
if err != nil {
invalidImages.Store(oghash, true)
createIdenticon(j, false, i)
}
i, err = newImageFromPath(hash)
if err != nil {
invalidImages.Store(oghash, true)
createIdenticon(j, false, i)
}
*/
setImageFromPath(hash, i)
glib.IdleAdd(func() {
setImageFromPath(hash, i)
})
return
}
}
iqResp, err := stanza.NewIQ(stanza.Attrs{
Type: "get",
@@ -519,12 +521,12 @@ func getAvatar(j, hash string, i *gtk.Image) { // TODO: This function probably s
}
glib.IdleAdd(func() {
err = setImageFromPath(hash, i)
if err != nil {
invalidImages.Store(oghash, true)
createIdenticon(j, false, i)
}
err = setImageFromPath(hash, i)
if err != nil {
invalidImages.Store(oghash, true)
createIdenticon(j, false, i)
}
i.AddCSSClass(loadedConfig.CVD.String() + "_CVD")
i.AddCSSClass(loadedConfig.CVD.String() + "_CVD")
})
}