2007-07-03 16:38:27 UTC
Hi,
I got a problem in which the online/offline status of the contacts are not updated when a contact goes online or offline.
In my friendsUpdatedReceived method,
public void friendsUpdateReceived(SessionFriendEvent ev) {
for (YahooUser aYu : ev.getFriends()) {
// log.fine("Updated: " + yu[i].toString());
if (aYu==null) continue;
Contact contact = getContactFactory().create(aYu.getId(), YMsgConnection.this);
//YMsgConnection.
/* for (int i = 0; i < getGroupList().size(); i++) {
Group group = getGroupList().get(i);
GroupImpl gw = (GroupImpl) group;
System.err.println("Group " + i + ":" + gw.getName());
for (int j = 0; j < group.size(); j++) {
Nameable contact = group.get(j);
PeopleContact peopleContact = new PeopleContact();
if (contact instanceof ContactImpl) {
ContactImpl cw = (ContactImpl) contact;
System.err.print("Contact:" + cw.getName() + " ");
System.err.println(cw.getDisplayName() + "~" + cw.getStatus());
StatusImpl sw = (StatusImpl) cw.getStatus();
peopleContact.setName(cw.getName());
peopleContact.setDisplayName(cw.getDisplayName());
}
}
}*/
/*Group group = getGroupFactory().create(ev.getGroup());
group.add(getContactFactory().create(ev.getFriend().getId(), YMsgConnection.this));
getGroupList().add(group);*/
System.err.println("YMsgConnection= " + contact.getDisplayName());
for (ConnectionEventListener eventHandler : eventHandlers) { //online: info.getOnSince().getTime() > 0
System.err.println("isLoggenIn=" + aYu.isLoggedIn() + " , isAway=" + isAway(aYu));
eventHandler.statusChanged(YMsgConnection.this, contact, aYu.isLoggedIn(), isAway(aYu), 0);
}
}
}