summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsessiontab.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2020-09-28 19:51:24 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2020-09-28 19:51:24 +0100
commit376f690f8fb9253f33bc207dce6e533dff9c8687 (patch)
tree9b5077efe190e91f0c2a309038dca2e48664582c /indra/newview/llfloaterimsessiontab.cpp
parent1cba874abf6f955cf52d68c30c3230ec58528057 (diff)
parentbac6652cdcd2d8333df04c3ebd3a6a7b752328b3 (diff)
Merge remote-tracking branch 'origin/master' into DRTVWR-517
Diffstat (limited to 'indra/newview/llfloaterimsessiontab.cpp')
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 3aee08482b..d604d0a789 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -465,9 +465,10 @@ void LLFloaterIMSessionTab::appendMessage(const LLChat& chat, const LLSD &args)
}
}
-
+static LLTrace::BlockTimerStatHandle FTM_BUILD_CONVERSATION_VIEW_PARTICIPANT("Build Conversation View");
void LLFloaterIMSessionTab::buildConversationViewParticipant()
{
+ LL_RECORD_BLOCK_TIME(FTM_BUILD_CONVERSATION_VIEW_PARTICIPANT);
// Clear the widget list since we are rebuilding afresh from the model
conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin();
while (widget_it != mConversationsWidgets.end())
@@ -496,14 +497,20 @@ void LLFloaterIMSessionTab::buildConversationViewParticipant()
}
}
-void LLFloaterIMSessionTab::addConversationViewParticipant(LLConversationItem* participant_model)
+void LLFloaterIMSessionTab::addConversationViewParticipant(LLConversationItem* participant_model, bool update_view)
{
+ if (!participant_model)
+ {
+ // Nothing to do if the model is inexistent
+ return;
+ }
+
// Check if the model already has an associated view
LLUUID uuid = participant_model->getUUID();
LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,uuid);
// If not already present, create the participant view and attach it to the root, otherwise, just refresh it
- if (widget)
+ if (widget && update_view)
{
updateConversationViewParticipant(uuid); // overkill?
}
@@ -524,8 +531,8 @@ void LLFloaterIMSessionTab::removeConversationViewParticipant(const LLUUID& part
{
mConversationsRoot->extractItem(widget);
delete widget;
- mConversationsWidgets.erase(participant_id);
}
+ mConversationsWidgets.erase(participant_id);
}
void LLFloaterIMSessionTab::updateConversationViewParticipant(const LLUUID& participant_id)