#4675 Voice indicator did not reappear after tuning

resume() was trigggering sOnCurrentChannelChanged which was wiping
participant list with no follow up updates.
master
Andrey Kleshchev 2025-09-15 23:47:11 +03:00 committed by Hecklezz
parent d070b996bd
commit cf683a2eb8
4 changed files with 16 additions and 4 deletions

View File

@ -545,7 +545,7 @@ void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& sessi
{ {
bool old_value = mIsInActiveVoiceChannel; bool old_value = mIsInActiveVoiceChannel;
mIsInActiveVoiceChannel = vmi->getUUID() == session_id; mIsInActiveVoiceChannel = vmi->getUUID() == session_id;
mCallIconLayoutPanel->setVisible(mIsInActiveVoiceChannel); mCallIconLayoutPanel->setVisible(mIsInActiveVoiceChannel && !LLVoiceChannel::isSuspended());
if (old_value != mIsInActiveVoiceChannel) if (old_value != mIsInActiveVoiceChannel)
{ {
refresh(); refresh();

View File

@ -200,8 +200,17 @@ void SpeakingIndicatorManager::cleanupSingleton()
void SpeakingIndicatorManager::sOnCurrentChannelChanged(const LLUUID& /*session_id*/) void SpeakingIndicatorManager::sOnCurrentChannelChanged(const LLUUID& /*session_id*/)
{ {
switchSpeakerIndicators(mSwitchedIndicatorsOn, false); if (LLVoiceChannel::isSuspended())
mSwitchedIndicatorsOn.clear(); {
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() void SpeakingIndicatorManager::onParticipantsChanged()

View File

@ -357,6 +357,8 @@ void LLVoiceChannel::suspend()
{ {
sSuspendedVoiceChannel = sCurrentVoiceChannel; sSuspendedVoiceChannel = sCurrentVoiceChannel;
sSuspended = true; sSuspended = true;
sCurrentVoiceChannelChangedSignal(sSuspendedVoiceChannel->mSessionID);
} }
} }
@ -365,6 +367,7 @@ void LLVoiceChannel::resume()
{ {
if (sSuspended) if (sSuspended)
{ {
sSuspended = false; // needs to be before activate() so that observers will be able to read state
if (LLVoiceClient::getInstance()->voiceEnabled()) if (LLVoiceClient::getInstance()->voiceEnabled())
{ {
if (sSuspendedVoiceChannel) if (sSuspendedVoiceChannel)
@ -382,7 +385,6 @@ void LLVoiceChannel::resume()
LLVoiceChannelProximal::getInstance()->activate(); LLVoiceChannelProximal::getInstance()->activate();
} }
} }
sSuspended = false;
} }
} }

View File

@ -103,6 +103,7 @@ public:
static void suspend(); static void suspend();
static void resume(); static void resume();
static bool isSuspended() { return sSuspended; }
protected: protected:
virtual void setState(EState state); virtual void setState(EState state);