summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-11-09 19:06:00 -0800
committerMerov Linden <merov@lindenlab.com>2012-11-09 19:06:00 -0800
commit99181a9777b7e42ed6e863a074789f37aa6b43f8 (patch)
treebb74fc6d1e940e3116a6aafdf060a43c9a5e3fe7 /indra
parent04e84eb826e0f2ea2a8c222d705afc945d3340dc (diff)
CHUI-479 : WIP : Fixed the missing agent appearance in torn off dialogs by adding a consistency check and rebuild.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index a47c9177a1..c39319b373 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -263,11 +263,21 @@ void LLFloaterIMSessionTab::draw()
{
if (mRefreshTimer->hasExpired())
{
- if (getParticipantList())
+ LLParticipantList* item = getParticipantList();
+ if (item)
{
- getParticipantList()->update();
+ // Update all model items
+ item->update();
+ // If the model and view list diverge in count, rebuild
+ // Note: this happens sometimes right around init (add participant events fire but get dropped) and is the cause
+ // of missing participants, often, the user agent itself. As there will be no other event fired, there's
+ // no other choice but get those inconsistencies regularly (and lightly) checked and scrubbed.
+ if (item->getChildrenCount() != mConversationsWidgets.size())
+ {
+ buildConversationViewParticipant();
+ }
}
-
+
refreshConversation();
// Restart the refresh timer
@@ -376,7 +386,7 @@ void LLFloaterIMSessionTab::buildConversationViewParticipant()
LLParticipantList* item = getParticipantList();
if (!item)
{
- // Nothing to do if the model list is empty
+ // Nothing to do if the model list is inexistent
return;
}
@@ -470,7 +480,8 @@ void LLFloaterIMSessionTab::refreshConversation()
session_name = LLIMModel::instance().getName(mSessionID);
}
updateSessionName(session_name);
- }
+ }
+
mConversationViewModel.requestSortAll();
mConversationsRoot->arrangeAll();
mConversationsRoot->update();