summaryrefslogtreecommitdiff
path: root/indra/newview/llchiclet.cpp
diff options
context:
space:
mode:
authorDessie Linden <dessie@lindenlab.com>2010-05-14 09:11:17 -0700
committerDessie Linden <dessie@lindenlab.com>2010-05-14 09:11:17 -0700
commit5fe6a5489ccfea4772f4cd4e3310b98a71ff2bab (patch)
tree74f791fe0470ae9528b552e87ff572851efab3da /indra/newview/llchiclet.cpp
parentc72d3b8bf40d7a6443345a9a53df5e6f7739a4b1 (diff)
parentd9f519d55c4b5cff0fa56d2130a7e25a144be9ff (diff)
Merged
Diffstat (limited to 'indra/newview/llchiclet.cpp')
-rw-r--r--indra/newview/llchiclet.cpp35
1 files changed, 20 insertions, 15 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 9c4aa7b964..6897f4ee8e 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -183,20 +183,6 @@ void LLSysWellChiclet::setCounter(S32 counter)
mButton->setLabel(s_count);
- setNewMessagesState(counter > mCounter);
-
- // we have to flash to 'Lit' state each time new unread message is coming.
- if (counter > mCounter)
- {
- mFlashToLitTimer->flash();
- }
- else if (counter == 0)
- {
- // if notification is resolved while well is flashing it can leave in the 'Lit' state
- // when flashing finishes itself. Let break flashing here.
- mFlashToLitTimer->stopFlashing();
- }
-
mCounter = counter;
}
@@ -316,7 +302,26 @@ void LLIMWellChiclet::createMenu()
void LLIMWellChiclet::messageCountChanged(const LLSD& session_data)
{
- setCounter(LLBottomTray::getInstance()->getTotalUnreadIMCount());
+ const LLUUID& session_id = session_data["session_id"];
+ const S32 counter = LLBottomTray::getInstance()->getTotalUnreadIMCount();
+ const bool im_not_visible = !LLFloaterReg::instanceVisible("im_container")
+ && !LLFloaterReg::instanceVisible("impanel", session_id);
+
+ setNewMessagesState(counter > mCounter && im_not_visible);
+
+ // we have to flash to 'Lit' state each time new unread message is coming.
+ if (counter > mCounter && im_not_visible)
+ {
+ mFlashToLitTimer->flash();
+ }
+ else if (counter == 0)
+ {
+ // if notification is resolved while well is flashing it can leave in the 'Lit' state
+ // when flashing finishes itself. Let break flashing here.
+ mFlashToLitTimer->stopFlashing();
+ }
+
+ setCounter(counter);
}
/************************************************************************/