summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsession.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-04-01 15:36:05 -0700
committerGilbert Gonzales <gilbert@lindenlab.com>2013-04-01 15:36:05 -0700
commitb37f501a87f91851d8b2d9904d3910e95def1abc (patch)
treef33e4706cabc48865a9d0140f28f6197f98afec7 /indra/newview/llfloaterimsession.cpp
parent56939a2a2b9510bd7f5fc43bed460c0d23a743a0 (diff)
CHUI-796 (User doesn't get all messages in 'do not disturb' mode): Now when a conversation is focused by clicking on it's line item, selecting a torn off floater or unminimized a torn off floater the stored notifications for that conversation will be removed.
Diffstat (limited to 'indra/newview/llfloaterimsession.cpp')
-rw-r--r--indra/newview/llfloaterimsession.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index 6d5145f205..edc25a7d7e 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -39,6 +39,7 @@
#include "llchannelmanager.h"
#include "llchiclet.h"
#include "llchicletbar.h"
+#include "lldonotdisturbnotificationstorage.h"
#include "llfloaterreg.h"
#include "llfloateravatarpicker.h"
#include "llfloaterimcontainer.h" // to replace separate IM Floaters with multifloater container
@@ -645,6 +646,23 @@ void LLFloaterIMSession::setDocked(bool docked, bool pop_on_undock)
}
}
+void LLFloaterIMSession::setMinimized(BOOL b)
+{
+ bool wasMinimized = isMinimized();
+ LLFloaterIMSessionTab::setMinimized(b);
+
+ //Switching from minimized state to un-minimized state
+ if(wasMinimized && !b)
+ {
+ //When in DND mode, remove stored IM notifications
+ //Nearby chat (Null) IMs are not stored while in DND mode, so can ignore removal
+ if(gAgent.isDoNotDisturb())
+ {
+ LLDoNotDisturbNotificationStorage::getInstance()->removeNotification(LLDoNotDisturbNotificationStorage::toastName, mSessionID);
+ }
+ }
+}
+
void LLFloaterIMSession::setVisible(BOOL visible)
{
LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*>
@@ -713,6 +731,18 @@ BOOL LLFloaterIMSession::getVisible()
return visible;
}
+void LLFloaterIMSession::setFocus(BOOL focus)
+{
+ LLFloaterIMSessionTab::setFocus(focus);
+
+ //When in DND mode, remove stored IM notifications
+ //Nearby chat (Null) IMs are not stored while in DND mode, so can ignore removal
+ if(focus && gAgent.isDoNotDisturb())
+ {
+ LLDoNotDisturbNotificationStorage::getInstance()->removeNotification(LLDoNotDisturbNotificationStorage::toastName, mSessionID);
+ }
+}
+
//static
bool LLFloaterIMSession::toggle(const LLUUID& session_id)
{