diff options
| -rw-r--r-- | indra/newview/llconversationview.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llspeakingindicatormanager.cpp | 13 | ||||
| -rw-r--r-- | indra/newview/llvoicechannel.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llvoicechannel.h | 1 |
4 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 0e0ab236d6..99d770b6e2 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -543,7 +543,7 @@ void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& sessi { bool old_value = mIsInActiveVoiceChannel; mIsInActiveVoiceChannel = vmi->getUUID() == session_id; - mCallIconLayoutPanel->setVisible(mIsInActiveVoiceChannel); + mCallIconLayoutPanel->setVisible(mIsInActiveVoiceChannel && !LLVoiceChannel::isSuspended()); if (old_value != mIsInActiveVoiceChannel) { refresh(); diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index 532b245ced..06458a9f3c 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -200,8 +200,17 @@ void SpeakingIndicatorManager::cleanupSingleton() void SpeakingIndicatorManager::sOnCurrentChannelChanged(const LLUUID& /*session_id*/) { - switchSpeakerIndicators(mSwitchedIndicatorsOn, false); - mSwitchedIndicatorsOn.clear(); + if (LLVoiceChannel::isSuspended()) + { + switchSpeakerIndicators(mSwitchedIndicatorsOn, false); + mSwitchedIndicatorsOn.clear(); + } + else + { + // Multiple onParticipantsChanged can arrive at the same time + // from different sources, might want to filter by some factor. + onParticipantsChanged(); + } } void SpeakingIndicatorManager::onParticipantsChanged() diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index b3ac28eb7a..fbe896ac27 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -357,6 +357,8 @@ void LLVoiceChannel::suspend() { sSuspendedVoiceChannel = sCurrentVoiceChannel; sSuspended = true; + + sCurrentVoiceChannelChangedSignal(sSuspendedVoiceChannel->mSessionID); } } @@ -365,6 +367,7 @@ void LLVoiceChannel::resume() { if (sSuspended) { + sSuspended = false; // needs to be before activate() so that observers will be able to read state if (LLVoiceClient::getInstance()->voiceEnabled()) { if (sSuspendedVoiceChannel) @@ -382,7 +385,6 @@ void LLVoiceChannel::resume() LLVoiceChannelProximal::getInstance()->activate(); } } - sSuspended = false; } } diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index 4d7bf551e1..bf119638d3 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -103,6 +103,7 @@ public: static void suspend(); static void resume(); + static bool isSuspended() { return sSuspended; } protected: virtual void setState(EState state); |
