diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-05-08 21:41:56 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-05-08 21:41:56 +0300 |
commit | 3175525950ecf568eb75a6cb4f9283ee32dcd9a5 (patch) | |
tree | e7e28987b5618ffcf081a3ef0bdbb9717ccd1d6c /indra/newview/llconversationmodel.cpp | |
parent | 9d2cb130e35fcbab98d5e7cb4d0d26ca6a16503b (diff) | |
parent | 34322f8f37380df868703051230f2a4109602b3f (diff) |
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llconversationmodel.cpp')
-rw-r--r-- | indra/newview/llconversationmodel.cpp | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index ebbbf23dee..c258136889 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -351,7 +351,7 @@ void LLConversationItemSession::setParticipantIsMuted(const LLUUID& participant_ LLConversationItemParticipant* participant = findParticipant(participant_id); if (participant) { - participant->muteVoice(is_muted); + participant->moderateVoice(is_muted); } } @@ -498,6 +498,7 @@ void LLConversationItemSession::onAvatarNameCache(const LLAvatarName& av_name) LLConversationItemParticipant::LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : LLConversationItem(display_name,uuid,root_view_model), + mIsModeratorMuted(false), mIsModerator(false), mDisplayModeratorLabel(false), mDistToAgent(-1.0) @@ -508,6 +509,7 @@ LLConversationItemParticipant::LLConversationItemParticipant(std::string display LLConversationItemParticipant::LLConversationItemParticipant(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : LLConversationItem(uuid,root_view_model), + mIsModeratorMuted(false), mIsModerator(false), mDisplayModeratorLabel(false), mDistToAgent(-1.0) @@ -597,25 +599,7 @@ void LLConversationItemParticipant::setDisplayModeratorRole(bool displayRole) bool LLConversationItemParticipant::isVoiceMuted() { - return LLMuteList::getInstance()->isMuted(mUUID, LLMute::flagVoiceChat); -} - -void LLConversationItemParticipant::muteVoice(bool mute_voice) -{ - LLAvatarName av_name; - LLAvatarNameCache::get(mUUID, &av_name); - LLMuteList * mute_listp = LLMuteList::getInstance(); - bool voice_already_muted = mute_listp->isMuted(mUUID, av_name.getUserName()); - - LLMute mute(mUUID, av_name.getUserName(), LLMute::AGENT); - if (voice_already_muted && !mute_voice) - { - mute_listp->remove(mute); - } - else if (!voice_already_muted && mute_voice) - { - mute_listp->add(mute); - } + return mIsModeratorMuted || LLMuteList::getInstance()->isMuted(mUUID, LLMute::flagVoiceChat); } // |