diff options
Diffstat (limited to 'indra/newview/llconversationmodel.cpp')
-rw-r--r-- | indra/newview/llconversationmodel.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 176c05248d..9fa8758d11 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -36,7 +36,6 @@ LLConversationItem::LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : LLFolderViewModelItemCommon(root_view_model), mName(display_name), - mUseNameForSort(true), mUUID(uuid), mNeedsRefresh(true), mConvType(CONV_UNKNOWN), @@ -47,7 +46,6 @@ LLConversationItem::LLConversationItem(std::string display_name, const LLUUID& u LLConversationItem::LLConversationItem(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : LLFolderViewModelItemCommon(root_view_model), mName(""), - mUseNameForSort(true), mUUID(uuid), mNeedsRefresh(true), mConvType(CONV_UNKNOWN), @@ -58,7 +56,6 @@ LLConversationItem::LLConversationItem(const LLUUID& uuid, LLFolderViewModelInte LLConversationItem::LLConversationItem(LLFolderViewModelInterface& root_view_model) : LLFolderViewModelItemCommon(root_view_model), mName(""), - mUseNameForSort(true), mUUID(), mNeedsRefresh(true), mConvType(CONV_UNKNOWN), @@ -254,9 +251,8 @@ LLConversationItemParticipant::LLConversationItemParticipant(const LLUUID& uuid, void LLConversationItemParticipant::onAvatarNameCache(const LLAvatarName& av_name) { - mUseNameForSort = !av_name.mUsername.empty(); - mName = (mUseNameForSort ? av_name.mUsername : NO_TOOLTIP_STRING); - mDisplayName = (av_name.mDisplayName.empty() ? mName : av_name.mDisplayName); + mName = (av_name.mUsername.empty() ? av_name.mDisplayName : av_name.mUsername); + mDisplayName = (av_name.mDisplayName.empty() ? av_name.mUsername : av_name.mDisplayName); mNeedsRefresh = true; if (mParent) { @@ -367,7 +363,7 @@ bool LLConversationSort::operator()(const LLConversationItem* const& a, const LL } // By default, in all other possible cases (including sort order type LLConversationFilter::SO_NAME of course), // we sort by name - S32 compare = LLStringUtil::compareDict((a->useNameForSort() ? a->getName() : a->getDisplayName()), (b->useNameForSort() ? b->getName() : b->getDisplayName())); + S32 compare = LLStringUtil::compareDict(a->getName(), b->getName()); return (compare < 0); } |