summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimnearbychathandler.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-07-24 14:40:23 -0400
committerOz Linden <oz@lindenlab.com>2013-07-24 14:40:23 -0400
commit9f393c1d99232e622317f7f0dd28519c2af63d0d (patch)
tree842f1ab4c5d13bc1cd772ebf1356c8f7424596d9 /indra/newview/llfloaterimnearbychathandler.cpp
parent2b2719d8cae1e35fa9e4cfcb87519bae9a64b2bf (diff)
parenta4966a661213a25b780604084fe169565f62f548 (diff)
merge up to latest snowstorm integration branch
Diffstat (limited to 'indra/newview/llfloaterimnearbychathandler.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/llfloaterimnearbychathandler.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index 7afcf288ce..9ce5e12897 100644..100755
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -559,9 +559,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
- if(( nearby_chat->hasFocus()
- || im_box->hasFocus()
- || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT
+ if(( ( chat_msg.mSourceType == CHAT_SOURCE_AGENT
&& gSavedSettings.getBOOL("UseChatBubbles") )
|| mChannel.isDead()
|| !mChannel.get()->getShowToasts() )
@@ -606,17 +604,20 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
toast_msg = chat_msg.mText;
}
- //Don't show nearby toast, if conversation is visible but not focused
- LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(LLUUID());
- if (session_floater && session_floater->isMessagePaneExpanded()
- && session_floater->isInVisibleChain() && !session_floater->isMinimized()
- && !(session_floater->getHost() && session_floater->getHost()->isMinimized()))
+ //Don't show nearby toast, if conversation is visible and selected
+ if ((nearby_chat->hasFocus()) ||
+ ((im_box->getSelectedSession().isNull() &&
+ ((LLFloater::isVisible(im_box) && !im_box->isMinimized() && im_box->isFrontmost())
+ || (LLFloater::isVisible(nearby_chat) && !nearby_chat->isMinimized() && nearby_chat->isFrontmost())))))
{
- return;
+ if(nearby_chat->isMessagePaneExpanded())
+ {
+ return;
+ }
}
//Will show toast when chat preference is set
- if((gSavedSettings.getString("NotificationNearbyChatOptions") == "toast") || !session_floater->isMessagePaneExpanded())
+ if((gSavedSettings.getString("NotificationNearbyChatOptions") == "toast") || !nearby_chat->isMessagePaneExpanded())
{
// Add a nearby chat toast.
LLUUID id;