summaryrefslogtreecommitdiff
path: root/indra/newview/llchiclet.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-07-24 12:34:32 -0400
committerOz Linden <oz@lindenlab.com>2013-07-24 12:34:32 -0400
commit4faad350c7dd7fa2e2606231d8293c357823348a (patch)
tree8318e8e25d64fd1c8b5d085d75580b06ff631532 /indra/newview/llchiclet.cpp
parentcf33a9a7b31b19d0f87e11997aaba938a8ee950d (diff)
Improve envelope notification behavior when there is no toast to display
Diffstat (limited to 'indra/newview/llchiclet.cpp')
-rwxr-xr-xindra/newview/llchiclet.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 88884042d4..131aea9da3 100755
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -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;
}
//////////////////////////////////////////////////////////////////////////