From d2a17e20ca889851406f22907df35b17f5030279 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Thu, 31 Jan 2013 03:16:25 +0200 Subject: CHUI-612 FIXED Blank conversation names showing in conversation list --- indra/newview/llfloaterimsessiontab.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'indra/newview/llfloaterimsessiontab.cpp') diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index f52cf3b8f0..6dbcdb4474 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -498,25 +498,28 @@ void LLFloaterIMSessionTab::refreshConversation() updateSessionName(session_name); } - LLParticipantList* participant_list = getParticipantList(); - if (participant_list) + if (mSessionID.notNull()) { - LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = participant_list->getChildrenBegin(); - LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = participant_list->getChildrenEnd(); - LLIMSpeakerMgr *speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); - while (current_participant_model != end_participant_model) + LLParticipantList* participant_list = getParticipantList(); + if (participant_list) { - LLConversationItemParticipant* participant_model = dynamic_cast(*current_participant_model); - if (speaker_mgr && participant_model) + LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = participant_list->getChildrenBegin(); + LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = participant_list->getChildrenEnd(); + LLIMSpeakerMgr *speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); + while (current_participant_model != end_participant_model) { - LLSpeaker *participant_speaker = speaker_mgr->findSpeaker(participant_model->getUUID()); - LLSpeaker *agent_speaker = speaker_mgr->findSpeaker(gAgentID); - if (participant_speaker && agent_speaker) + LLConversationItemParticipant* participant_model = dynamic_cast(*current_participant_model); + if (speaker_mgr && participant_model) { - participant_model->setDisplayModeratorRole(agent_speaker->mIsModerator && participant_speaker->mIsModerator); + LLSpeaker *participant_speaker = speaker_mgr->findSpeaker(participant_model->getUUID()); + LLSpeaker *agent_speaker = speaker_mgr->findSpeaker(gAgentID); + if (participant_speaker && agent_speaker) + { + participant_model->setDisplayModeratorRole(agent_speaker->mIsModerator && participant_speaker->mIsModerator); + } } + current_participant_model++; } - current_participant_model++; } } -- cgit v1.2.3