Fix for FIRE-3618 Contact Sets Retain Coloring After Dissolving Friendship

meow-7.2.2
LGG@LGG-LAPPY 2011-10-18 13:51:08 -05:00
parent d0dcc110cf
commit e8adc13547
2 changed files with 18 additions and 0 deletions

View File

@ -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;
}

View File

@ -172,6 +172,18 @@ void lggContactSetsFloater::processProperties(void* data, EAvatarProcessorType t
void lggContactSetsFloater::changed(U32 mask)
{
if(mask & (LLFriendObserver::REMOVE))
{
const std::set<LLUUID>& changed_items = LLAvatarTracker::instance().getChangedIDs();
std::set<LLUUID>::const_iterator id_it = changed_items.begin();
std::set<LLUUID>::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();