summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2012-10-24 13:06:30 +0300
committermaxim_productengine <mnikolenko@productengine.com>2012-10-24 13:06:30 +0300
commit06978c99d12a1261f3834fa2ebc19e24c54fd1d4 (patch)
treeda09f8adce3cbdaaf166419ae7905cfbd6848052
parent873d03e96f8fe10705e99a5ef1c1baca96fb2325 (diff)
CHUI-430 FIXED Open Nearby chat if is is the only conversation in the list.
-rw-r--r--indra/newview/llimfloatercontainer.cpp16
-rw-r--r--indra/newview/llimfloatercontainer.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index cf4d054dd5..7821f2ee0d 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -222,6 +222,7 @@ BOOL LLIMFloaterContainer::postBuild()
void LLIMFloaterContainer::onOpen(const LLSD& key)
{
LLMultiFloater::onOpen(key);
+ openNearbyChat();
}
// virtual
@@ -508,6 +509,7 @@ void LLIMFloaterContainer::setVisible(BOOL visible)
LLSD name("nearby_chat");
LLFloaterReg::toggleInstanceOrBringToFront(name);
}
+ openNearbyChat();
}
nearby_chat = LLFloaterReg::findTypedInstance<LLNearbyChat>("nearby_chat");
@@ -1491,4 +1493,18 @@ void LLIMFloaterContainer::toggleAllowTextChat(const LLUUID& participant_uuid)
}
}
+void LLIMFloaterContainer::openNearbyChat()
+{
+ // If there's only one conversation in the container and that conversation is the nearby chat
+ //(which it should be...), open it so to make the list of participants visible. This happens to be the most common case when opening the Chat floater.
+ if(mConversationsItems.size() == 1)
+ {
+ LLConversationViewSession* nearby_chat = dynamic_cast<LLConversationViewSession*>(mConversationsWidgets[LLUUID()]);
+ if (nearby_chat)
+ {
+ nearby_chat->setOpen(TRUE);
+ }
+ }
+}
+
// EOF
diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h
index ba2d085858..75fed18502 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -138,6 +138,7 @@ private:
void moderateVoiceAllParticipants(bool unmute);
void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute);
void toggleAllowTextChat(const LLUUID& participant_uuid);
+ void openNearbyChat();
LLButton* mExpandCollapseBtn;
LLLayoutPanel* mMessagesPane;