summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authormaxim@mnikolenko <maxim@mnikolenko>2013-01-03 13:38:42 +0200
committermaxim@mnikolenko <maxim@mnikolenko>2013-01-03 13:38:42 +0200
commitdf3f00443f6b4e0f6667f8d5b091af90d2bf340f (patch)
treeaaae5450c73deb45b4b428fd04565f899976a9ff /indra/newview/llagent.cpp
parent7e8d336749b42ce134a67dfe1f1990644f1b263a (diff)
parenta25e6eb733bb8f6a0e9f8de1094155f685c6216d (diff)
Merge
Diffstat (limited to 'indra/newview/llagent.cpp')
-rwxr-xr-xindra/newview/llagent.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 49c570c30b..fc3be9ca21 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -41,6 +41,7 @@
#include "llchannelmanager.h"
#include "llchicletbar.h"
#include "llconsole.h"
+#include "lldonotdisturbnotificationstorage.h"
#include "llenvmanager.h"
#include "llfirstuse.h"
#include "llfloatercamera.h"
@@ -1389,11 +1390,16 @@ BOOL LLAgent::getAFK() const
//-----------------------------------------------------------------------------
// setDoNotDisturb()
//-----------------------------------------------------------------------------
-void LLAgent::setDoNotDisturb(bool pIsDotNotDisturb)
+void LLAgent::setDoNotDisturb(bool pIsDoNotDisturb)
{
- mIsDoNotDisturb = pIsDotNotDisturb;
- sendAnimationRequest(ANIM_AGENT_DO_NOT_DISTURB, (pIsDotNotDisturb ? ANIM_REQUEST_START : ANIM_REQUEST_STOP));
- LLNotificationsUI::LLChannelManager::getInstance()->muteAllChannels(pIsDotNotDisturb);
+ bool isDoNotDisturbSwitchedOff = (mIsDoNotDisturb && !pIsDoNotDisturb);
+ mIsDoNotDisturb = pIsDoNotDisturb;
+ sendAnimationRequest(ANIM_AGENT_DO_NOT_DISTURB, (pIsDoNotDisturb ? ANIM_REQUEST_START : ANIM_REQUEST_STOP));
+ LLNotificationsUI::LLChannelManager::getInstance()->muteAllChannels(pIsDoNotDisturb);
+ if (isDoNotDisturbSwitchedOff)
+ {
+ LLDoNotDisturbNotificationStorage::getInstance()->loadNotifications();
+ }
}
//-----------------------------------------------------------------------------