summaryrefslogtreecommitdiff
path: root/indra/newview/llimfloatercontainer.cpp
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-11-07 10:43:08 -0800
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-11-07 10:43:08 -0800
commite73acc8dbdd3f86b217f744eb48a33dfa2c72f9e (patch)
tree48bccf868a1629099dc5001ea3b99a5afaa86737 /indra/newview/llimfloatercontainer.cpp
parent18011db7f0b60e4ec499e3cbdda4e4f716f458a2 (diff)
parent8828eb21e2a8960bbcfd4edb2d113dbada7d4a5d (diff)
Pull and merge from ssh://stinson@hg.lindenlab.com/richard/viewer-chui/.
Diffstat (limited to 'indra/newview/llimfloatercontainer.cpp')
-rw-r--r--indra/newview/llimfloatercontainer.cpp41
1 files changed, 26 insertions, 15 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 52deae445b..af43b1ac38 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -424,15 +424,21 @@ bool LLIMFloaterContainer::onConversationModelEvent(const LLSD& event)
LLConversationItemSession* session_model = dynamic_cast<LLConversationItemSession*>(mConversationsItems[session_id]);
if (session_model)
{
- LLConversationItemParticipant* participant_model = session_model->findParticipant(participant_id);
- if (participant_model)
+ const LLUUID& uuid = session_model->getUUID();
+
+ LLIMModel::LLIMSession * im_sessionp = LLIMModel::getInstance()->findIMSession(uuid);
+
+ if (uuid.isNull() || im_sessionp && !im_sessionp->isP2PSessionType())
{
- participant_view = createConversationViewParticipant(participant_model);
- participant_view->addToFolder(session_view);
- participant_view->setVisible(TRUE);
+ LLConversationItemParticipant* participant_model = session_model->findParticipant(participant_id);
+ if (participant_model)
+ {
+ participant_view = createConversationViewParticipant(participant_model);
+ participant_view->addToFolder(session_view);
+ participant_view->setVisible(TRUE);
+ }
}
}
-
}
}
else if (type == "update_participant")
@@ -1175,17 +1181,22 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid, bool isWi
// Add a new conversation widget to the root folder of the folder view
widget->addToFolder(mConversationsRoot);
widget->requestArrange();
-
+
+ LLIMModel::LLIMSession * im_sessionp = LLIMModel::getInstance()->findIMSession(uuid);
+
// Create the participants widgets now
// Note: usually, we do not get an updated avatar list at that point
- LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = item->getChildrenBegin();
- LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = item->getChildrenEnd();
- while (current_participant_model != end_participant_model)
- {
- LLConversationItem* participant_model = dynamic_cast<LLConversationItem*>(*current_participant_model);
- LLConversationViewParticipant* participant_view = createConversationViewParticipant(participant_model);
- participant_view->addToFolder(widget);
- current_participant_model++;
+ if (uuid.isNull() || im_sessionp && !im_sessionp->isP2PSessionType())
+ {
+ LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = item->getChildrenBegin();
+ LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = item->getChildrenEnd();
+ while (current_participant_model != end_participant_model)
+ {
+ LLConversationItem* participant_model = dynamic_cast<LLConversationItem*>(*current_participant_model);
+ LLConversationViewParticipant* participant_view = createConversationViewParticipant(participant_model);
+ participant_view->addToFolder(widget);
+ current_participant_model++;
+ }
}
// set the widget to minimized mode if conversations pane is collapsed