FIRE-10278: Show correct voice volume in Nearby Voice if we have a stored volume

meow-7.2.2
Ansariel 2015-05-07 19:43:59 +02:00
parent 7500b8f9ac
commit 4d23288e05
1 changed files with 21 additions and 0 deletions

View File

@ -377,6 +377,27 @@ void LLAvatarListItem::setAvatarId(const LLUUID& id, const LLUUID& session_id, b
mAvatarId = id;
mSpeakingIndicator->setSpeakerId(id, session_id);
// <FS:Ansariel> FIRE-10278: Show correct voice volume if we have it stored
if (LLVoiceClient::getInstance()->getVoiceEnabled(mAvatarId))
{
bool is_muted = LLAvatarActions::isVoiceMuted(mAvatarId);
F32 volume;
if (is_muted)
{
// it's clearer to display their volume as zero
volume = 0.f;
}
else
{
// actual volume
volume = LLVoiceClient::getInstance()->getUserVolume(mAvatarId);
}
mVoiceSlider->setValue((F64)volume);
}
// </FS:Ansariel>
// We'll be notified on avatar online status changes
if (!ignore_status_changes && mAvatarId.notNull())
LLAvatarTracker::instance().addParticularFriendObserver(mAvatarId, this);