diff options
author | mberezhnoy <mberezhnoy@productengine.com> | 2013-01-23 10:23:16 +0200 |
---|---|---|
committer | mberezhnoy <mberezhnoy@productengine.com> | 2013-01-23 10:23:16 +0200 |
commit | 651f230500646dfcd695a9caa0650f81fa29b9bf (patch) | |
tree | 6be2278bf48218c9e25139ccf197623bb4873b79 /indra/newview/llconversationview.cpp | |
parent | 40c88de2c0525ec72b41e40b5f5b48fdf295aba2 (diff) |
CHUI-678 (Voice indicators not shown for participants in torn off conference conversations)
Diffstat (limited to 'indra/newview/llconversationview.cpp')
-rwxr-xr-x | indra/newview/llconversationview.cpp | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 903dd2a407..bdd5dfc51a 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -82,6 +82,7 @@ LLConversationViewSession::LLConversationViewSession(const LLConversationViewSes mVoiceClientObserver(NULL), mCollapsedMode(false), mHasArrow(true), + mIsInActiveVoiceChannel(false), mFlashStateOn(false), mFlashStarted(false) { @@ -178,6 +179,7 @@ BOOL LLConversationViewSession::postBuild() LLIconCtrl* icon = mItemPanel->getChild<LLIconCtrl>("nearby_chat_icon"); icon->setVisible(true); mSpeakingIndicator->setSpeakerId(gAgentID, LLUUID::null, true); + mIsInActiveVoiceChannel = true; if(LLVoiceClient::instanceExists()) { LLNearbyVoiceClientStatusObserver* mVoiceClientObserver = new LLNearbyVoiceClientStatusObserver(this); @@ -232,6 +234,8 @@ void LLConversationViewSession::draw() (*iit)->setVisible(draw_children); } + refresh(); + LLView::draw(); } @@ -351,6 +355,25 @@ void LLConversationViewSession::refresh() // Update all speaking indicators LLSpeakingIndicatorManager::updateSpeakingIndicators(); + + // we should show indicator for specified voice session only if this is current channel. EXT-5562. + if (!mIsInActiveVoiceChannel) + { + if (mSpeakingIndicator) + { + mSpeakingIndicator->setVisible(false); + } + LLConversationViewParticipant* participant = NULL; + items_t::const_iterator iter; + for (iter = getItemsBegin(); iter != getItemsEnd(); iter++) + { + participant = dynamic_cast<LLConversationViewParticipant*>(*iter); + if (participant) + { + participant->hideSpeakingIndicator(); + } + } + } // Do the regular upstream refresh LLFolderViewFolder::refresh(); @@ -362,8 +385,8 @@ void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& sessi if (vmi) { - bool is_active = vmi->getUUID() == session_id; - mCallIconLayoutPanel->setVisible(is_active); + mIsInActiveVoiceChannel = vmi->getUUID() == session_id; + mCallIconLayoutPanel->setVisible(mIsInActiveVoiceChannel); } } @@ -623,5 +646,10 @@ LLView* LLConversationViewParticipant::getItemChildView(EAvatarListItemChildInde return child_view; } +void LLConversationViewParticipant::hideSpeakingIndicator() +{ + mSpeakingIndicator->setVisible(false); +} + // EOF |