summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llconversationmodel.cpp')
-rw-r--r--indra/newview/llconversationmodel.cpp33
1 files changed, 25 insertions, 8 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index b1f45d6d64..bc5b72e029 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -434,24 +434,31 @@ void LLConversationItemParticipant::fetchAvatarName()
}
}
-void LLConversationItemParticipant::buildContextMenu(LLMenuGL& menu, U32 flags)
+void LLConversationItemParticipant::updateAvatarName()
{
- menuentry_vec_t items;
- menuentry_vec_t disabled_items;
-
- buildParticipantMenuOptions(items);
-
- hide_context_entries(menu, items, disabled_items);
+ llassert(getUUID().notNull());
+ if (getUUID().notNull())
+ {
+ LLAvatarName av_name;
+ if (LLAvatarNameCache::get(getUUID(),&av_name))
+ {
+ updateAvatarName(av_name);
+ }
+ }
}
void LLConversationItemParticipant::onAvatarNameCache(const LLAvatarName& av_name)
{
mAvatarNameCacheConnection.disconnect();
+ updateAvatarName(av_name);
+}
+void LLConversationItemParticipant::updateAvatarName(const LLAvatarName& av_name)
+{
mName = av_name.getUserName();
mDisplayName = av_name.getDisplayName();
mNeedsRefresh = true;
- if(mParent != NULL)
+ if (mParent != NULL)
{
LLConversationItemSession* parent_session = dynamic_cast<LLConversationItemSession*>(mParent);
if (parent_session != NULL)
@@ -463,6 +470,16 @@ void LLConversationItemParticipant::onAvatarNameCache(const LLAvatarName& av_nam
}
}
+void LLConversationItemParticipant::buildContextMenu(LLMenuGL& menu, U32 flags)
+{
+ menuentry_vec_t items;
+ menuentry_vec_t disabled_items;
+
+ buildParticipantMenuOptions(items);
+
+ hide_context_entries(menu, items, disabled_items);
+}
+
LLConversationItemSession* LLConversationItemParticipant::getParentSession()
{
LLConversationItemSession* parent_session = NULL;