diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-02-01 22:12:13 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-02-01 22:28:15 +0200 |
commit | 609a26b59a82bb8dfa5722b5f8ea6c42014360d2 (patch) | |
tree | 6a362b94a06ced7a8b063d7e5c86ce751800c2b3 /indra/newview/llfloaterimcontainer.cpp | |
parent | eac0f1857c6e8e89be649b60dcd8dca7573933df (diff) | |
parent | 21565a1f3fe1ae737e2f91c58be2c3cb0b5a2fec (diff) |
Merge branch 'master' of https://bitbucket.org/lindenlab/viewer/src/master into DRTVWR-515-maint
# Conflicts:
# autobuild.xml (llca)
# indra/llwindow/llwindow.h (SL-13507 vs SL-5894)
# indra/newview/llscenemonitor.cpp (SL-14422)
# indra/newview/llvovolume.cpp (SL-12069)
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 86c79791b8..8d38a5743b 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -464,19 +464,23 @@ void LLFloaterIMContainer::idleUpdate() const LLConversationItem *current_session = getCurSelectedViewModelItem(); if (current_session) { - // Update moderator options visibility - LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = current_session->getChildrenBegin(); - LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = current_session->getChildrenEnd(); - bool is_moderator = isGroupModerator(); - bool can_ban = haveAbilityToBan(); - while (current_participant_model != end_participant_model) + if (current_session->getType() == LLConversationItem::CONV_SESSION_GROUP) { - LLConversationItemParticipant* participant_model = dynamic_cast<LLConversationItemParticipant*>(*current_participant_model); - participant_model->setModeratorOptionsVisible(is_moderator); - participant_model->setGroupBanVisible(can_ban && participant_model->getUUID() != gAgentID); - - current_participant_model++; + // Update moderator options visibility + LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = current_session->getChildrenBegin(); + LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = current_session->getChildrenEnd(); + bool is_moderator = isGroupModerator(); + bool can_ban = haveAbilityToBan(); + while (current_participant_model != end_participant_model) + { + LLConversationItemParticipant* participant_model = dynamic_cast<LLConversationItemParticipant*>(*current_participant_model); + participant_model->setModeratorOptionsVisible(is_moderator); + participant_model->setGroupBanVisible(can_ban && participant_model->getUUID() != gAgentID); + + current_participant_model++; + } } + // Update floater's title as required by the currently selected session or use the default title LLFloaterIMSession * conversation_floaterp = LLFloaterIMSession::findInstance(current_session->getUUID()); setTitle(conversation_floaterp && conversation_floaterp->needsTitleOverwrite() ? conversation_floaterp->getTitle() : mGeneralTitle); |