diff options
Diffstat (limited to 'indra/newview/lldonotdisturbnotificationstorage.cpp')
-rw-r--r-- | indra/newview/lldonotdisturbnotificationstorage.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp index 15c42e8285..6e39d049a5 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.cpp +++ b/indra/newview/lldonotdisturbnotificationstorage.cpp @@ -146,6 +146,7 @@ void LLDoNotDisturbNotificationStorage::loadNotifications() LLNotifications& instance = LLNotifications::instance(); bool imToastExists = false; + bool offerExists = false; for (LLSD::array_const_iterator notification_it = data.beginArray(); notification_it != data.endArray(); @@ -160,6 +161,10 @@ void LLDoNotDisturbNotificationStorage::loadNotifications() { imToastExists = true; } + else if(notificationName == offerName) + { + offerExists = true; + } //New notification needs to be added notification = (LLNotificationPtr) new LLNotification(notification_params.with("is_dnd", true)); @@ -183,6 +188,11 @@ void LLDoNotDisturbNotificationStorage::loadNotifications() LLFloaterReg::showInstance("im_container"); } + if(imToastExists || offerExists) + { + make_ui_sound_deferred("UISndNewIncomingIMSession"); + } + //writes out empty .xml file (since LLCommunicationChannel::mHistory is empty) saveNotifications(); } @@ -196,6 +206,7 @@ void LLDoNotDisturbNotificationStorage::updateNotifications() LLNotifications& instance = LLNotifications::instance(); bool imToastExists = false; + bool offerExists = false; for (LLCommunicationChannel::history_list_t::const_iterator it = commChannel->beginHistory(); it != commChannel->endHistory(); @@ -208,6 +219,10 @@ void LLDoNotDisturbNotificationStorage::updateNotifications() { imToastExists = true; } + else if(notificationName == offerName) + { + offerExists = true; + } //Notification already exists in notification pipeline (same instance of app running) if (notification) @@ -222,6 +237,11 @@ void LLDoNotDisturbNotificationStorage::updateNotifications() LLFloaterReg::showInstance("im_container"); } + if(imToastExists || offerExists) + { + make_ui_sound("UISndNewIncomingIMSession"); + } + //When exit DND mode, write empty notifications file if(commChannel->getHistorySize()) { |