[jitsi-dev] Contact list is not refreshed when XMPP status message is updated


#1

Hi all,

currently the display of a contact's status is not being updated correctly
if only the status message changes, but not the status itself. That is, if
someone in your conract list is in DnD and manually adds a status message
"In a conference call", this change will not be visible to you unless you
click on that contact, causing the getTreeCellRendererComponent method
from the ContactListTreeCellRenderer to be called. I was able to fix this
by going throught the following :

1) adding a new PacketListener to the in the registrationStateChanged
method of the OperationSetPersistentPresenceJabberImpl with a
PacketTypeFilter(Presence.class)
2) calling firePresenceStatusChanged(Presence) whenever any presence
information arives using 1)
3) Removing the following check from the firePresenceStatusChanged method
of the ContactChangesListener:
if(oldStatus.equals(newStatus)) return;
4) Removing the
if (evt.getOldStatus() == evt.getNewStatus()) return;
from the contactPresenceStatusChanged of the MetaContactListSource

I see that this solution is quite elaborate and that all of those "old
equals new" status checks have some purpose, but I do not exactly get
neither how to do in in a more elegant way, nor what is the rationale
behind prohibiting the status message change by chose checks. Could someone
maybe shed some light on this matter for me?

Kind regards,
Alexander Fedulov