summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llblocklist.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llblocklist.cpp b/indra/newview/llblocklist.cpp
index cb68f677eb..0165a9c4e8 100644
--- a/indra/newview/llblocklist.cpp
+++ b/indra/newview/llblocklist.cpp
@@ -267,9 +267,15 @@ bool LLBlockListNameTypeComparator::doCompare(const LLBlockedListItem* blocked_i
LLMute::EType type1 = blocked_item1->getType();
LLMute::EType type2 = blocked_item2->getType();
- if (type1 != type2)
+ // if mute type is LLMute::BY_NAME or LLMute::OBJECT it means that this mute is an object
+ bool both_mutes_are_objects = (LLMute::OBJECT == type1 || LLMute::BY_NAME == type1) && (LLMute::OBJECT == type2 || LLMute::BY_NAME == type2);
+
+ // mute types may be different, but since both LLMute::BY_NAME and LLMute::OBJECT types represent objects
+ // it's needed to perform additional checking of both_mutes_are_objects variable
+ if (type1 != type2 && !both_mutes_are_objects)
{
- return type1 > type2;
+ // objects in block list go first, so return true if mute type is not an avatar
+ return LLMute::AGENT != type1;
}
return NAME_COMPARATOR.compare(blocked_item1, blocked_item2);