Improve envelope notification behavior when there is no toast to display

meow-7.2.2
Oz Linden 2013-07-24 12:34:32 -04:00
parent cf33a9a7b3
commit 4faad350c7
4 changed files with 21 additions and 11 deletions

View File

@ -220,18 +220,25 @@ void LLNotificationChiclet::setCounter(S32 counter)
bool LLNotificationChiclet::ChicletNotificationChannel::filterNotification( LLNotificationPtr notification )
{
if (notification->getName() == "ScriptDialog")
bool displayNotification;
if ( (notification->getName() == "ScriptDialog") // special case for scripts
// if there is no toast window for the notification, filter it
|| (!LLNotificationWellWindow::getInstance()->findItemByID(notification->getID()))
)
{
return false;
displayNotification = false;
}
if( !(notification->canLogToIM() && notification->hasFormElements())
&& (!notification->getPayload().has("give_inventory_notification")
|| notification->getPayload()["give_inventory_notification"]))
else if( !(notification->canLogToIM() && notification->hasFormElements())
&& (!notification->getPayload().has("give_inventory_notification")
|| notification->getPayload()["give_inventory_notification"]))
{
return true;
displayNotification = true;
}
return false;
else
{
displayNotification = false;
}
return displayNotification;
}
//////////////////////////////////////////////////////////////////////////

View File

@ -118,6 +118,11 @@ void LLSysWellWindow::removeItemByID(const LLUUID& id)
}
}
LLPanel * LLSysWellWindow::findItemByID(const LLUUID& id)
{
return mMessageList->getItemByValue(id);
}
//---------------------------------------------------------------------------------
//---------------------------------------------------------------------------------
void LLSysWellWindow::initChannel()

View File

@ -55,6 +55,7 @@ public:
// Operating with items
void removeItemByID(const LLUUID& id);
LLPanel * findItemByID(const LLUUID& id);
// Operating with outfit
virtual void setVisible(BOOL visible);

View File

@ -6756,7 +6756,6 @@ Offer a teleport?
icon="notify.tga"
name="FriendshipOffered"
log_to_im="true"
show_toast="false"
type="notify">
<tag>friendship</tag>
You have offered friendship to [TO_NAME]
@ -6806,7 +6805,6 @@ Offer a teleport?
icon="notify.tga"
name="FriendshipAcceptedByMe"
log_to_im="true"
show_toast="false"
type="notify">
<tag>friendship</tag>
Friendship offer accepted.
@ -6816,7 +6814,6 @@ Friendship offer accepted.
icon="notify.tga"
name="FriendshipDeclinedByMe"
log_to_im="true"
show_toast="false"
type="notify">
<tag>friendship</tag>
Friendship offer declined.