6-7
This commit is contained in:
+18
-16
@@ -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")
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user