diff --git a/indra/newview/lggcontactsets.cpp b/indra/newview/lggcontactsets.cpp index 8d81c7f2e9..dc33b0bee0 100644 --- a/indra/newview/lggcontactsets.cpp +++ b/indra/newview/lggcontactsets.cpp @@ -294,6 +294,12 @@ BOOL LGGContactSets::hasFriendColorThatShouldShow(LLUUID friend_id,bool chat, bo if(chat &&!(sPhoenixColorContactSetsChat))return FALSE; if(radar && !contactSetsColorizeRadar)return FALSE; + //don't show friend color if they are no longer a friend + //(and if are also not on the "non friends" list) + if( (!LLAvatarTracker::instance().isBuddy(friend_id)) + &&(!isNonFriend(friend_id))) return FALSE; + + if(getFriendColor(friend_id)==getDefaultColor())return FALSE; return TRUE; } diff --git a/indra/newview/lggcontactsetsfloater.cpp b/indra/newview/lggcontactsetsfloater.cpp index c25d2b20e5..fa90f2ebf2 100644 --- a/indra/newview/lggcontactsetsfloater.cpp +++ b/indra/newview/lggcontactsetsfloater.cpp @@ -172,6 +172,18 @@ void lggContactSetsFloater::processProperties(void* data, EAvatarProcessorType t void lggContactSetsFloater::changed(U32 mask) { + if(mask & (LLFriendObserver::REMOVE)) + { + const std::set& changed_items = LLAvatarTracker::instance().getChangedIDs(); + std::set::const_iterator id_it = changed_items.begin(); + std::set::const_iterator id_end = changed_items.end(); + for (;id_it != id_end; ++id_it) + { + //if we are fortunate enough to be the viewer of choice when + //someone removes a friend, go and clean up the contact sets + LGGContactSets::getInstance()->removeFriendFromAllGroups(*id_it); + } + } if(mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE )) { sInstance->generateCurrentList();