summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexanderP ProductEngine <apaschenko@productengine.com>2013-02-20 17:11:50 +0200
committerAlexanderP ProductEngine <apaschenko@productengine.com>2013-02-20 17:11:50 +0200
commitc48e644220ad1708a93987faf9ac96bcdd097dec (patch)
tree08d8041bf0539c3bb1b2fd30af067ee51d734a11
parent3ae9124ce555dada3d14ede28a6658cddcfa53b8 (diff)
CHUI-773 ADD FIX Conversation line item does not flash for unselected conversation when Flash Toolbar Button preference is selected : repair case "open and not on top"
-rw-r--r--indra/newview/llimview.cpp40
1 files changed, 21 insertions, 19 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index cf6a215970..d69bd89f13 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -199,8 +199,14 @@ void on_new_message(const LLSD& msg)
// execution of the action
LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
- LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
+ if (im_box->isFrontmost() && im_box->getSelectedSession() == session_id)
+ {
+ return;
+ }
+
+ LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
+
//session floater not focused (visible or not)
bool session_floater_not_focused = session_floater && !session_floater->hasFocus();
@@ -250,25 +256,21 @@ void on_new_message(const LLSD& msg)
else if ("flash" == action)
{
- if (conversation_floater_not_focused)
+ if (!gAgent.isDoNotDisturb())
{
- if(!session_floater_is_open && !gAgent.isDoNotDisturb())
- {
- //User is not focused on conversation containing the message
- gToolBarView->flashCommand(LLCommandId("chat"), true);
- }
-
- im_box->flashConversationItemWidget(session_id, true);
-
- //If a DND message, allow notification to be stored so upon DND exit
- //useMostItrusiveIMNotification will be called to notify user a message exists
- if(session_id.notNull()
- && participant_id.notNull()
- && gAgent.isDoNotDisturb())
- {
- LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
- }
- }
+ im_box->flashConversationItemWidget(session_id, true);
+ if(conversation_floater_not_focused)
+ {
+ //User is not focused on conversation containing the message
+ gToolBarView->flashCommand(LLCommandId("chat"), true);
+ }
+ }
+ else if(session_id.notNull() && participant_id.notNull())
+ {
+ //If a DND message, allow notification to be stored so upon DND exit
+ //useMostItrusiveIMNotification will be called to notify user a message exists
+ LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
+ }
}
else if("openconversations" == action && !session_floater_is_open)