Skip to content

Draft: feat: use transport icons in contact avatars

Nicoco requested to merge nicoco/gajim:transport-icons into master

It looks OK I think?

image

This really is just a draft. The most urgent issue is that we need to hook to appropriate events so that contact avatars are updated when the gateway avatar becomes available or change. I think the lack of this explains why some contacts do not have the telegram logo (visible on the screenshot) and why in my informal tests I had a generic "red T" avatar instead of the envelope appear sometimes. Can I have some guidance about the best way to proceed here? I'm not sure where it's appropriate to trigger the avatar refresh (probably in several gtk/ files, chat_row, chat_banner, roster…?). Besides that, I think there are other things to fix before this is ready to merge:

  • Someone review my Cairo code because I'm clicking buttons but I don't really understand what I am doing
  • Ensure avatars are updated when the gateway avatar becomes available
  • Use the gateway avatar for groups
  • Use the gateway avatar for group participants
  • Harmonise behaviour with hard-coded transport icons

About that last point, I think the rule should be: if there is a hard-coded icon in gajim, we use it, but if not, we try to use the gateway's PEP avatar. Maybe it should be the other way around but I fear this is going to become awkward as we mix "icons that are immediately available" with "avatars that may be available later". Maybe we should ditch all hard-coded transport icons all along? I would tend to think this is a good idea except for the fact that biboumi does not have an avatar and I think it probably is the most widely-used transport for XMPP users, so it would suck a bit.

Edited by Nicoco

Merge request reports