Пример #1
0
 /**
  * Indicates that a MetaContact has been modified.
  *
  * @param evt the MetaContactListEvent containing the corresponding contact
  */
 public void metaContactRenamed(MetaContactRenamedEvent evt) {
   for (ComparableEvtObj msc : recentMessages) {
     if (evt.getSourceMetaContact().containsContact(msc.getContact())) {
       if (recentQuery != null) recentQuery.updateContactDisplayName(msc, evt.getNewDisplayName());
     }
   }
 }
Пример #2
0
  /**
   * If a contact is renamed update the locally stored message if any.
   *
   * @param evt the <tt>ContactPropertyChangeEvent</tt> containing the source
   */
  @Override
  public void contactModified(ContactPropertyChangeEvent evt) {
    if (!evt.getPropertyName().equals(ContactPropertyChangeEvent.PROPERTY_DISPLAY_NAME)) return;

    Contact contact = evt.getSourceContact();

    if (contact == null) return;

    for (ComparableEvtObj msc : recentMessages) {
      if (contact.equals(msc.getContact())) {
        if (recentQuery != null)
          recentQuery.updateContactDisplayName(msc, contact.getDisplayName());

        return;
      }
    }
  }