summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationmodel.cpp
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-12-04 17:23:31 -0800
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-12-04 17:23:31 -0800
commit85e97f772e23c0595c4ce249f533cad746ddd3c6 (patch)
tree2f633528858c3ba345d2a26dcb3f51773a080783 /indra/newview/llconversationmodel.cpp
parent60c72c85e2360284ecc3326871dcc76fcce0e945 (diff)
parent55bd994b3968a2852c846ebe3bf924a964daf714 (diff)
Pull and merge from ssh://stinson@hg.lindenlab.com/richard/viewer-chui/.
Diffstat (limited to 'indra/newview/llconversationmodel.cpp')
-rw-r--r--indra/newview/llconversationmodel.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 728b1a3f4c..0b7c3939df 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -528,12 +528,8 @@ bool LLConversationSort::operator()(const LLConversationItem* const& a, const LL
{
// If both are sessions
U32 sort_order = getSortOrderSessions();
- if ((type_a == LLConversationItem::CONV_SESSION_NEARBY) || (type_b == LLConversationItem::CONV_SESSION_NEARBY))
- {
- // If one is the nearby session, put nearby session *always* first
- return (type_a == LLConversationItem::CONV_SESSION_NEARBY);
- }
- else if (sort_order == LLConversationFilter::SO_DATE)
+
+ if (sort_order == LLConversationFilter::SO_DATE)
{
// Sort by time
F64 time_a = 0.0;
@@ -552,14 +548,22 @@ bool LLConversationSort::operator()(const LLConversationItem* const& a, const LL
}
// If no time available, we'll default to sort by name at the end of this method
}
- else if (sort_order == LLConversationFilter::SO_SESSION_TYPE)
+ else
{
- if (type_a != type_b)
+ if ((type_a == LLConversationItem::CONV_SESSION_NEARBY) || (type_b == LLConversationItem::CONV_SESSION_NEARBY))
{
- // Lowest types come first. See LLConversationItem definition of types
- return (type_a < type_b);
+ // If one is the nearby session, put nearby session *always* last
+ return (type_b == LLConversationItem::CONV_SESSION_NEARBY);
}
+ else if (sort_order == LLConversationFilter::SO_SESSION_TYPE)
+ {
+ if (type_a != type_b)
+ {
+ // Lowest types come first. See LLConversationItem definition of types
+ return (type_a < type_b);
+ }
// If types are identical, we'll default to sort by name at the end of this method
+ }
}
}
else