summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorsimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-09-18 15:08:15 -0700
committersimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-09-18 15:08:15 -0700
commitfb80c4b859c6a7c0667b7ab75081ade9d3943e6c (patch)
tree83fa0753a26ebf528209ac66282c7453c383659c /indra/newview
parent307368f70e1de47fa4d388e94329c8d998c34f21 (diff)
MAINT-1580 - Viewer shows "Unknown Notification" message on startup. Reviewed
by Kelly
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llnotificationstorage.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp
index fb1adc7ddf..4df2a79b61 100644
--- a/indra/newview/llnotificationstorage.cpp
+++ b/indra/newview/llnotificationstorage.cpp
@@ -164,21 +164,29 @@ void LLPersistentNotificationStorage::loadNotifications()
++notification_it)
{
LLSD notification_params = *notification_it;
- LLNotificationPtr notification(new LLNotification(notification_params));
- LLNotificationResponderPtr responder(LLResponderRegistry::
- createResponder(notification_params["name"], notification_params["responder"]));
- notification->setResponseFunctor(responder);
+ if (instance.templateExists(notification_params["name"].asString()))
+ {
+ LLNotificationPtr notification(new LLNotification(notification_params));
+
+ LLNotificationResponderPtr responder(LLResponderRegistry::
+ createResponder(notification_params["name"], notification_params["responder"]));
+ notification->setResponseFunctor(responder);
- instance.add(notification);
+ instance.add(notification);
- // hide script floaters so they don't confuse the user and don't overlap startup toast
- LLScriptFloaterManager::getInstance()->setFloaterVisible(notification->getID(), false);
+ // hide script floaters so they don't confuse the user and don't overlap startup toast
+ LLScriptFloaterManager::getInstance()->setFloaterVisible(notification->getID(), false);
- if(notification_channel)
+ if(notification_channel)
+ {
+ // hide saved toasts so they don't confuse the user
+ notification_channel->hideToast(notification->getID());
+ }
+ }
+ else
{
- // hide saved toasts so they don't confuse the user
- notification_channel->hideToast(notification->getID());
+ llwarns << "Failed to find template for persistent notification " << notification_params["name"].asString() << llendl;
}
}
}