summaryrefslogtreecommitdiff
path: root/indra/newview/lldonotdisturbnotificationstorage.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-01-04 17:58:30 -0800
committerGilbert Gonzales <gilbert@lindenlab.com>2013-01-04 17:58:30 -0800
commit02ca16c1334d1409d8b14136f76305686796c359 (patch)
tree48353024dafd13c4df289041c150fd137c0e4abf /indra/newview/lldonotdisturbnotificationstorage.cpp
parentaa6fee292d1721eac6f0f1f270844e01e06979d4 (diff)
CHUI-499: Now when existing DND mode, stored IM's will not show a toast but instead flash the conversation line item and Chat FUI button.
Diffstat (limited to 'indra/newview/lldonotdisturbnotificationstorage.cpp')
-rw-r--r--indra/newview/lldonotdisturbnotificationstorage.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp
index 6407a3fa0c..9bb2f27a46 100644
--- a/indra/newview/lldonotdisturbnotificationstorage.cpp
+++ b/indra/newview/lldonotdisturbnotificationstorage.cpp
@@ -109,15 +109,19 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()
++notification_it)
{
LLSD notification_params = *notification_it;
- LLNotificationPtr notification(new LLNotification(notification_params));
+ const LLUUID& notificationID = notification_params["id"];
+ LLNotificationPtr notification = instance.find(notificationID);
- const LLUUID& notificationID = notification->id();
- if (instance.find(notificationID))
+ //Notification already exists in notification pipeline (same instance of app running)
+ if (notification)
{
+ notification->setDND(true);
instance.update(notification);
}
+ //Notification doesn't exist (different instance since restarted app while in DND mode)
else
{
+ notification = (LLNotificationPtr) new LLNotification(notification_params.with("is_dnd", true));
LLNotificationResponderInterface* responder = createResponder(notification_params["responder_sd"]["responder_type"], notification_params["responder_sd"]);
if (responder == NULL)
{