Blocklist sometimes shows "(waiting)" as avatar name when blocking particle owners

Wed, 07 Jan 2015 16:51:27 +0100

author
Ansariel
date
Wed, 07 Jan 2015 16:51:27 +0100
changeset 43111
09b047af2751
parent 43110
938d814818ac
child 43112
d553b6945f37

Blocklist sometimes shows "(waiting)" as avatar name when blocking particle owners

indra/newview/llviewermenu.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llviewermenu.cpp	Wed Jan 07 14:30:53 2015 +0100
     1.2 +++ b/indra/newview/llviewermenu.cpp	Wed Jan 07 16:51:27 2015 +0100
     1.3 @@ -7686,25 +7686,44 @@
     1.4  
     1.5  class LLMuteParticle : public view_listener_t
     1.6  {
     1.7 +	// <FS:Ansariel> Blocklist sometimes shows "(waiting)" as avatar name when blocking particle owners
     1.8 +	void onAvatarNameCache(const LLUUID& av_id, const LLAvatarName& av_name)
     1.9 +	{
    1.10 +		LLMute mute(av_id, av_name.getLegacyName(), LLMute::AGENT);
    1.11 +		if (LLMuteList::getInstance()->isMuted(mute.mID))
    1.12 +		{
    1.13 +			LLMuteList::getInstance()->remove(mute);
    1.14 +		}
    1.15 +		else
    1.16 +		{
    1.17 +			LLMuteList::getInstance()->add(mute);
    1.18 +			LLPanelBlockedList::showPanelAndSelect(mute.mID);
    1.19 +		}
    1.20 +	}
    1.21 +	// </FS:Ansariel>
    1.22 +
    1.23  	bool handleEvent(const LLSD& userdata)
    1.24  	{
    1.25  		LLUUID id = LLToolPie::getInstance()->getPick().mParticleOwnerID;
    1.26  		
    1.27  		if (id.notNull())
    1.28  		{
    1.29 -			std::string name;
    1.30 -			gCacheName->getFullName(id, name);
    1.31 -
    1.32 -			LLMute mute(id, name, LLMute::AGENT);
    1.33 -			if (LLMuteList::getInstance()->isMuted(mute.mID))
    1.34 -			{
    1.35 -				LLMuteList::getInstance()->remove(mute);
    1.36 -			}
    1.37 -			else
    1.38 -			{
    1.39 -				LLMuteList::getInstance()->add(mute);
    1.40 -				LLPanelBlockedList::showPanelAndSelect(mute.mID);
    1.41 -			}
    1.42 +			// <FS:Ansariel> Blocklist sometimes shows "(waiting)" as avatar name when blocking particle owners
    1.43 +			//std::string name;
    1.44 +			//gCacheName->getFullName(id, name);
    1.45 +
    1.46 +			//LLMute mute(id, name, LLMute::AGENT);
    1.47 +			//if (LLMuteList::getInstance()->isMuted(mute.mID))
    1.48 +			//{
    1.49 +			//	LLMuteList::getInstance()->remove(mute);
    1.50 +			//}
    1.51 +			//else
    1.52 +			//{
    1.53 +			//	LLMuteList::getInstance()->add(mute);
    1.54 +			//	LLPanelBlockedList::showPanelAndSelect(mute.mID);
    1.55 +			//}
    1.56 +			LLAvatarNameCache::get(id, boost::bind(&LLMuteParticle::onAvatarNameCache, this, _1, _2));
    1.57 +			// </FS:Ansariel>
    1.58  		}
    1.59  
    1.60  		return true;

mercurial