Don't flash taskbar icon if receiving a message from a muted resident and in some various other cases

Fri, 01 Dec 2017 12:35:07 +0100

author
Ansariel
date
Fri, 01 Dec 2017 12:35:07 +0100
changeset 53521
2deeb2ae6be4
parent 53520
8ca179e02930
child 53522
3b4fe4d6b487

Don't flash taskbar icon if receiving a message from a muted resident and in some various other cases

indra/newview/llviewermessage.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llviewermessage.cpp	Fri Dec 01 10:39:43 2017 +0100
     1.2 +++ b/indra/newview/llviewermessage.cpp	Fri Dec 01 12:35:07 2017 +0100
     1.3 @@ -3002,6 +3002,7 @@
     1.4  		          (message.length() > 3) && (RLV_CMD_PREFIX == message[0]) && (RlvHandler::instance().processIMQuery(from_id, message)) )
     1.5  		{
     1.6  			// Eat the message and do nothing
     1.7 +			return;
     1.8  		}
     1.9  // [/RLVa:KB]
    1.10  //		else if (offline == IM_ONLINE 
    1.11 @@ -3339,7 +3340,9 @@
    1.12  				|| (binary_bucket[binary_bucket_size - 1] != '\0') )
    1.13  			{
    1.14  				LL_WARNS("Messaging") << "Malformed group notice binary bucket" << LL_ENDL;
    1.15 -				break;
    1.16 +				// <FS:Ansariel> Don't flash task icon
    1.17 +				//break;
    1.18 +				return;
    1.19  			}
    1.20  
    1.21  			// The group notice packet does not have an AgentID.  Obtain one from the name cache.
    1.22 @@ -3359,7 +3362,9 @@
    1.23  			}
    1.24  			else if (LLMuteList::getInstance()->isMuted(agent_id))
    1.25  			{
    1.26 -				break;
    1.27 +				// <FS:Ansariel> Don't flash task icon
    1.28 +				//break;
    1.29 +				return;
    1.30  			}
    1.31  
    1.32  			notice_bin_bucket = (struct notice_bucket_full_t*) &binary_bucket[0];
    1.33 @@ -3478,7 +3483,9 @@
    1.34  				if (binary_bucket_size != sizeof(invite_bucket_t))
    1.35  				{
    1.36  					LL_WARNS("Messaging") << "Malformed group invite binary bucket" << LL_ENDL;
    1.37 -					break;
    1.38 +					// <FS:Ansariel> Don't flash task icon
    1.39 +					//break;
    1.40 +					return;
    1.41  				}
    1.42  
    1.43  				invite_bucket = (struct invite_bucket_t*) &binary_bucket[0];
    1.44 @@ -3500,6 +3507,7 @@
    1.45  				if (is_rejecting_group_invites)
    1.46  				{
    1.47  					LL_INFOS("Messaging") << "Group invite automatically rejected because of the user setting..." << LL_ENDL;
    1.48 +					return;
    1.49  				}
    1.50  				else
    1.51  				{
    1.52 @@ -3507,7 +3515,6 @@
    1.53  					LLNotificationsUtil::add("JoinGroup", args, payload);
    1.54  				}
    1.55  				// </FS:PP>
    1.56 -
    1.57  			}
    1.58  		}
    1.59  		break;
    1.60 @@ -3529,7 +3536,9 @@
    1.61  				{
    1.62  					LL_WARNS("Messaging") << "Malformed inventory offer from agent" << LL_ENDL;
    1.63  					delete info;
    1.64 -					break;
    1.65 +					// <FS:Ansariel> Don't flash task icon
    1.66 +					//break;
    1.67 +					return; 
    1.68  				}
    1.69  				bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0];
    1.70  				info->mType = (LLAssetType::EType) bucketp->asset_type;
    1.71 @@ -3542,7 +3551,9 @@
    1.72  				{
    1.73  					LL_WARNS("Messaging") << "Malformed inventory offer from object" << LL_ENDL;
    1.74  					delete info;
    1.75 -					break;
    1.76 +					// <FS:Ansariel> Don't flash task icon
    1.77 +					//break;
    1.78 +					return; 
    1.79  				}
    1.80  				info->mType = (LLAssetType::EType) binary_bucket[0];
    1.81  				info->mObjectID = LLUUID::null;
    1.82 @@ -4289,7 +4300,7 @@
    1.83  	//if (viewer_window && viewer_window->getMinimized())
    1.84  	static LLCachedControl<bool> sFlashIcon(gSavedSettings, "FSFlashOnMessage");
    1.85  	static LLCachedControl<bool> sFSFlashOnObjectIM(gSavedSettings, "FSFlashOnObjectIM");
    1.86 -	if (viewer_window && dialog != IM_TYPING_START && dialog != IM_TYPING_STOP && sFlashIcon && (sFSFlashOnObjectIM || (chat.mChatType != CHAT_TYPE_IM)))
    1.87 +	if (viewer_window && dialog != IM_TYPING_START && dialog != IM_TYPING_STOP && sFlashIcon && (sFSFlashOnObjectIM || (chat.mChatType != CHAT_TYPE_IM)) && !is_muted)
    1.88  	{
    1.89  		viewer_window->flashIcon(5.f);
    1.90  	}

mercurial