From 56c63afb3d2dd089c17887e1bbec1e5ffd158dd1 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 17 Oct 2010 00:27:56 -0700 Subject: Several minor changes to how group chat ignore works users won't see --- linden/indra/newview/llfloatergroups.cpp | 4 ++-- linden/indra/newview/llimview.cpp | 11 +++++------ linden/indra/newview/llimview.h | 6 +++++- 3 files changed, 12 insertions(+), 9 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llfloatergroups.cpp b/linden/indra/newview/llfloatergroups.cpp index a85ce9d..79e9e31 100644 --- a/linden/indra/newview/llfloatergroups.cpp +++ b/linden/indra/newview/llfloatergroups.cpp @@ -610,9 +610,9 @@ void LLPanelGroups::applyChangesToGroups() } // chat - if (join_group_chat != (!gIMMgr->getIgnoreGroup(group_id))) + if (!join_group_chat != gIMMgr->getIgnoreGroup(group_id)) { - gIMMgr->updateIgnoreGroup(group_id, join_group_chat); + gIMMgr->updateIgnoreGroup(group_id, !join_group_chat); } } } diff --git a/linden/indra/newview/llimview.cpp b/linden/indra/newview/llimview.cpp index 5061197..2253404 100644 --- a/linden/indra/newview/llimview.cpp +++ b/linden/indra/newview/llimview.cpp @@ -613,11 +613,11 @@ void LLIMMgr::addMessage( // create IM window as necessary if(!floater) { - if (!mIgnoreGroupList.empty()) + if (gIMMgr->getIgnoreGroupListCount() > 0 && gAgent.isInGroup(session_id)) { // Check to see if we're blocking this group's chat - LLGroupData *group_data = NULL; - + LLGroupData* group_data = NULL; + // Search for this group in the agent's groups list LLDynamicArray::iterator i; @@ -631,9 +631,8 @@ void LLIMMgr::addMessage( } // If the group is in our list then return - if (group_data && getIgnoreGroup(group_data->mID)) + if (group_data && gIMMgr->getIgnoreGroup(group_data->mID)) { - // llinfos << "ignoring chat from group " << group_data->mID << llendl; return; } } @@ -1383,7 +1382,7 @@ void LLIMMgr::saveIgnoreGroup() } } -void LLIMMgr::updateIgnoreGroup(const LLUUID& group_id, const bool& ignore) +void LLIMMgr::updateIgnoreGroup(const LLUUID& group_id, bool ignore) { if (group_id.notNull()) { diff --git a/linden/indra/newview/llimview.h b/linden/indra/newview/llimview.h index 8f665d2..2539203 100644 --- a/linden/indra/newview/llimview.h +++ b/linden/indra/newview/llimview.h @@ -174,7 +174,7 @@ public: void loadIgnoreGroup(); void saveIgnoreGroup(); - void updateIgnoreGroup(const LLUUID& group_id, const bool& ignore); + void updateIgnoreGroup(const LLUUID& group_id, bool ignore); // Returns true if group chat is ignored for the UUID, false if not bool getIgnoreGroup(const LLUUID& group_id); @@ -219,6 +219,10 @@ private: LLSD mPendingAgentListUpdates; std::list mIgnoreGroupList; + +public: + + S32 getIgnoreGroupListCount() { return mIgnoreGroupList.size(); } }; -- cgit v1.1