From 702e4c7dc1a383f83a0324e97b087efef82e9248 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 19 Oct 2023 18:25:23 +0200 Subject: SL-20163 Rework LLAvatarPropertiesProcessor::sendRequest() --- indra/newview/llinspectavatar.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'indra/newview/llinspectavatar.cpp') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index b11c440015..4d003989fc 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -124,7 +124,7 @@ public: processor->addObserver(mAvatarID, this); // send a request (duplicates will be suppressed inside the avatar // properties processor) - processor->sendAvatarPropertiesRequest(mAvatarID); + processor->sendAvatarPropertiesRequest(mAvatarID, true); } ~LLFetchAvatarData() @@ -261,12 +261,15 @@ void LLInspectAvatar::requestUpdate() void LLInspectAvatar::processAvatarData(LLAvatarData* data) { LLStringUtil::format_map_t args; - { - std::string birth_date = LLTrans::getString("AvatarBirthDateFormat"); - LLStringUtil::format(birth_date, LLSD().with("datetime", (S32) data->born_on.secondsSinceEpoch())); - args["[BORN_ON]"] = birth_date; - } - args["[AGE]"] = LLDateUtil::ageFromDate(data->born_on, LLDate::now()); + + std::string birth_date = LLTrans::getString(data->hide_age ? + "AvatarBirthDateFormatShort" : + "AvatarBirthDateFormatFull"); + LLStringUtil::format(birth_date, LLSD().with("datetime", (S32)data->born_on.secondsSinceEpoch())); + args["[BORN_ON]"] = birth_date; + args["[AGE]"] = data->hide_age ? + LLStringUtilBase::null : + LLDateUtil::ageFromDate(data->born_on, LLDate::now()); args["[SL_PROFILE]"] = data->about_text; args["[RW_PROFILE"] = data->fl_about_text; args["[ACCTTYPE]"] = LLAvatarPropertiesProcessor::accountType(data); -- cgit v1.2.3