diff options
author | Merov Linden <merov@lindenlab.com> | 2012-10-03 16:46:46 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-10-03 16:46:46 -0700 |
commit | bd64c483639ae33518609398fce7c51ddc73dae7 (patch) | |
tree | a9c4a06faa6d9cb5b8125b4ade34c1198d396921 /indra/newview/llconversationmodel.cpp | |
parent | 4a25ce8b9d5d56b160d0d13c4681cd916c4ea4e0 (diff) |
CHUI-358 : Fixed the removal of participants as they leave conversations. Used the event mechanism for this.
Diffstat (limited to 'indra/newview/llconversationmodel.cpp')
-rw-r--r-- | indra/newview/llconversationmodel.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 1057dbaf31..7ddb725fb1 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -64,15 +64,13 @@ LLConversationItem::LLConversationItem(LLFolderViewModelInterface& root_view_mod { } -void LLConversationItem::postEvent(const std::string& event_type) +void LLConversationItem::postEvent(const std::string& event_type, LLConversationItemParticipant* participant) { LLSD event; - event["pump"] = "ConversationModelEvent"; - LLSD payload; - payload["type"] = event_type; - payload["name"] = getName(); - payload["uuid"] = getUUID(); - event["payload"] = payload; + event["type"] = event_type; + event["session_uuid"] = getUUID(); + event["participant_name"] = participant->getName(); + event["participant_uuid"] = participant->getUUID(); LLEventPumps::instance().obtain("ConversationsEvents").post(event); } @@ -124,14 +122,14 @@ void LLConversationItemSession::addParticipant(LLConversationItemParticipant* pa addChild(participant); mIsLoaded = true; mNeedsRefresh = true; - postEvent("add_participant"); + postEvent("add_participant", participant); } void LLConversationItemSession::removeParticipant(LLConversationItemParticipant* participant) { removeChild(participant); mNeedsRefresh = true; - postEvent("remove_participant"); + postEvent("remove_participant", participant); } void LLConversationItemSession::removeParticipant(const LLUUID& participant_id) @@ -269,7 +267,7 @@ void LLConversationItemParticipant::onAvatarNameCache(const LLAvatarName& av_nam mName = (av_name.mUsername.empty() ? av_name.mDisplayName : av_name.mUsername); mDisplayName = (av_name.mDisplayName.empty() ? av_name.mUsername : av_name.mDisplayName); mNeedsRefresh = true; - postEvent("update_participant"); + postEvent("update_participant", this); if (mParent) { mParent->requestSort(); |