summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llnotificationscripthandler.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp
index 65b1d5f95f..267d3ac092 100755
--- a/indra/newview/llnotificationscripthandler.cpp
+++ b/indra/newview/llnotificationscripthandler.cpp
@@ -122,8 +122,21 @@ void LLScriptHandler::onChange( LLNotificationPtr notification )
if (channel)
{
LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification);
- channel->modifyToastByNotificationID(notification->getID(), notify_box);
+
+ LLToast::Params p;
+ p.notif_id = notification->getID();
+ p.notification = notification;
+ p.panel = notify_box;
+ p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1);
+ if(gAgent.isDoNotDisturb())
+ {
+ p.force_show = notification->getName() == "SystemMessage"
+ || notification->getName() == "GodMessage"
+ || notification->getPriority() >= NOTIFICATION_PRIORITY_HIGH;
+ }
+ channel->removeToastByNotificationID(notification->getID());
+ channel->addToast(p);
}
}