diff options
Diffstat (limited to 'indra/newview/lldonotdisturbnotificationstorage.cpp')
-rw-r--r-- | indra/newview/lldonotdisturbnotificationstorage.cpp | 10 |
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) { |