summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-11-14 10:37:52 -0800
committerMerov Linden <merov@lindenlab.com>2012-11-14 10:37:52 -0800
commite15921e42b4ac14504b22b0acbb349aa6d19664b (patch)
tree4059a71460f87e12a69558d125cdf52226e38bed
parent99181a9777b7e42ed6e863a074789f37aa6b43f8 (diff)
CHUI-479 : WIP : Small refactoring to allow participant to be added to session whether or not its parent folder is.
-rwxr-xr-xindra/newview/llconversationview.cpp21
-rwxr-xr-xindra/newview/llconversationview.h1
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp1
3 files changed, 15 insertions, 8 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 295dd2ae6d..ad334869fb 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -460,21 +460,26 @@ void LLConversationViewParticipant::refresh()
void LLConversationViewParticipant::addToFolder(LLFolderViewFolder* folder)
{
- //Add the item to the folder (conversation)
+ // Add the item to the folder (conversation)
LLFolderViewItem::addToFolder(folder);
- //Now retrieve the folder (conversation) UUID, which is the speaker session
+ // Retrieve the folder (conversation) UUID, which is also the speaker session UUID
LLConversationItem* vmi = this->getParentFolder() ? dynamic_cast<LLConversationItem*>(this->getParentFolder()->getViewModelItem()) : NULL;
- if(vmi)
+ if (vmi)
{
- //Allows speaking icon image to be loaded based on mUUID
- mAvatarIcon->setValue(mUUID);
-
- //Allows the speaker indicator to be activated based on the user and conversation
- mSpeakingIndicator->setSpeakerId(mUUID, vmi->getUUID());
+ addToSession(vmi->getUUID());
}
}
+void LLConversationViewParticipant::addToSession(const LLUUID& session_id)
+{
+ //Allows speaking icon image to be loaded based on mUUID
+ mAvatarIcon->setValue(mUUID);
+
+ //Allows the speaker indicator to be activated based on the user and conversation
+ mSpeakingIndicator->setSpeakerId(mUUID, session_id);
+}
+
void LLConversationViewParticipant::onInfoBtnClick()
{
LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mUUID));
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index cc6995c207..3610ac67de 100755
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -121,6 +121,7 @@ public:
bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); }
virtual void refresh();
void addToFolder(LLFolderViewFolder* folder);
+ void addToSession(const LLUUID& session_id);
/*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask );
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index c39319b373..e78422145d 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -417,6 +417,7 @@ void LLFloaterIMSessionTab::addConversationViewParticipant(LLConversationItem* p
LLConversationViewParticipant* participant_view = createConversationViewParticipant(participant_model);
mConversationsWidgets[uuid] = participant_view;
participant_view->addToFolder(mConversationsRoot);
+ participant_view->addToSession(mSessionID);
participant_view->setVisible(TRUE);
refreshConversation();
}