summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-06-27 14:03:16 -0700
committerMerov Linden <merov@lindenlab.com>2012-06-27 14:03:16 -0700
commit1eb6b4509d9ae79f8313e1e68351028794093a53 (patch)
treea742adafa65512dfbfd9550a7e9d0b1b48bff321 /indra
parent0eda1f9a4d909870b15c6d7243e47838540598e8 (diff)
CHUI-139 : Make sure the Nearby Chat shows up in the conversations floater in every situation
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llimfloatercontainer.cpp31
1 files changed, 14 insertions, 17 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index f6bcf8bbe9..52bacf15e4 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -103,24 +103,7 @@ BOOL LLIMFloaterContainer::postBuild()
void LLIMFloaterContainer::onOpen(const LLSD& key)
{
- if (getFloaterCount() == 0)
- {
- // We always force the opening of the nearby chat conversation when we open for the first time
- // *TODO: find a way to move this to XML as a default panel or something like that
- LLSD name("chat_bar");
- LLFloaterReg::toggleInstanceOrBringToFront(name);
- }
LLMultiFloater::onOpen(key);
- /*
- if (key.isDefined())
- {
- LLIMFloater* im_floater = LLIMFloater::findInstance(key.asUUID());
- if (im_floater)
- {
- im_floater->openFloater();
- }
- }
- */
}
// virtual
@@ -307,6 +290,20 @@ void LLIMFloaterContainer::tabClose()
void LLIMFloaterContainer::setVisible(BOOL visible)
{
+ if (visible)
+ {
+ // Make sure we have the Nearby Chat present when showing the conversation container
+ LLUUID nearbychat_uuid = LLUUID::null; // Hacky but true: the session id for nearby chat is null
+ conversations_items_map::iterator item_it = mConversationsItems.find(nearbychat_uuid);
+ if (item_it == mConversationsItems.end())
+ {
+ // If not found, force the creation of the nearby chat conversation panel
+ // *TODO: find a way to move this to XML as a default panel or something like that
+ LLSD name("chat_bar");
+ LLFloaterReg::toggleInstanceOrBringToFront(name);
+ }
+ }
+
// We need to show/hide all the associated conversations that have been torn off
// (and therefore, are not longer managed by the multifloater),
// so that they show/hide with the conversations manager.