Merge branch 'DRTVWR-591-maint-X' of https://github.com/secondlife/viewer
# Conflicts: # indra/newview/llavatarpropertiesprocessor.cpp # indra/newview/llpanelprofile.cppmaster
commit
f6f68bb332
|
|
@ -42,8 +42,6 @@
|
|||
#include "llui.h" // LLUI::getLanguage()
|
||||
#include "message.h"
|
||||
|
||||
#include "llviewernetwork.h"
|
||||
|
||||
LLAvatarPropertiesProcessor::LLAvatarPropertiesProcessor()
|
||||
{
|
||||
}
|
||||
|
|
@ -310,6 +308,8 @@ bool LLAvatarPropertiesProcessor::hasPaymentInfoOnFile(const LLAvatarData* avata
|
|||
// static
|
||||
void LLAvatarPropertiesProcessor::requestAvatarPropertiesCoro(std::string cap_url, LLUUID avatar_id, EAvatarProcessorType type)
|
||||
{
|
||||
LLAvatarPropertiesProcessor& inst = instance();
|
||||
|
||||
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
|
||||
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
|
||||
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAvatarPropertiesCoro", httpPolicy));
|
||||
|
|
@ -324,7 +324,7 @@ void LLAvatarPropertiesProcessor::requestAvatarPropertiesCoro(std::string cap_ur
|
|||
LLSD result = httpAdapter->getAndSuspend(httpRequest, finalUrl, httpOpts, httpHeaders);
|
||||
|
||||
// Response is being processed, no longer pending is required
|
||||
getInstance()->removePendingRequest(avatar_id, type);
|
||||
inst.removePendingRequest(avatar_id, type);
|
||||
|
||||
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
|
||||
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
|
||||
|
|
@ -354,7 +354,8 @@ void LLAvatarPropertiesProcessor::requestAvatarPropertiesCoro(std::string cap_ur
|
|||
avatar_data.born_on = result["member_since"].asDate();
|
||||
// TODO: SL-20163 Remove the "has" check when SRV-684 is done
|
||||
// and the field "hide_age" is included to the http response
|
||||
avatar_data.hide_age = !result.has("hide_age") || result["hide_age"].asBoolean();
|
||||
inst.mIsHideAgeSupportedByServer = result.has("hide_age");
|
||||
avatar_data.hide_age = inst.isHideAgeSupportedByServer() && result["hide_age"].asBoolean();
|
||||
avatar_data.profile_url = getProfileURL(avatar_id.asString());
|
||||
avatar_data.customer_type = result["customer_type"].asString();
|
||||
avatar_data.notes = result["notes"].asString();
|
||||
|
|
@ -417,7 +418,7 @@ void LLAvatarPropertiesProcessor::requestAvatarPropertiesCoro(std::string cap_ur
|
|||
avatar_data.picks_list.emplace_back(pick_data["id"].asUUID(), pick_data["name"].asString());
|
||||
}
|
||||
|
||||
getInstance()->notifyObservers(avatar_id, &avatar_data, type);
|
||||
inst.notifyObservers(avatar_id, &avatar_data, type);
|
||||
}
|
||||
|
||||
void LLAvatarPropertiesProcessor::processAvatarLegacyPropertiesReply(LLMessageSystem* msg, void**)
|
||||
|
|
@ -437,9 +438,8 @@ void LLAvatarPropertiesProcessor::processAvatarLegacyPropertiesReply(LLMessageSy
|
|||
msg->getU32Fast( _PREHASH_PropertiesData, _PREHASH_Flags, avatar_data.flags);
|
||||
|
||||
LLDateUtil::dateFromPDTString(avatar_data.born_on, birth_date);
|
||||
// Since field 'hide_age' is not supported by msg system we'd better hide the age here
|
||||
// <FS:Ansariel> OpenSim
|
||||
avatar_data.hide_age = LLGridManager::instance().isInSecondLife();
|
||||
avatar_data.hide_age = true;
|
||||
// </FS:Ansariel>
|
||||
avatar_data.caption_index = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -297,6 +297,8 @@ public:
|
|||
|
||||
void sendClassifiedDelete(const LLUUID& classified_id);
|
||||
|
||||
bool isHideAgeSupportedByServer() { return mIsHideAgeSupportedByServer; }
|
||||
|
||||
// Returns translated, human readable string for account type, such
|
||||
// as "Resident" or "Linden Employee". Used for profiles, inspectors.
|
||||
static std::string accountType(const LLAvatarData* avatar_data);
|
||||
|
|
@ -359,6 +361,9 @@ protected:
|
|||
// Map avatar_id+request_type -> U32 timestamp in seconds
|
||||
typedef std::map< std::pair<LLUUID, EAvatarProcessorType>, U32> timestamp_map_t;
|
||||
timestamp_map_t mRequestTimestamps;
|
||||
|
||||
// Is returned by isHideAgeSupportedByServer()
|
||||
bool mIsHideAgeSupportedByServer { false };
|
||||
};
|
||||
|
||||
#endif // LL_LLAVATARPROPERTIESPROCESSOR_H
|
||||
|
|
|
|||
|
|
@ -743,7 +743,7 @@ BOOL LLPanelProfileSecondLife::postBuild()
|
|||
mGroupList = getChild<LLGroupList>("group_list");
|
||||
// <FS:Ansariel> Fix LL UI/UX design accident
|
||||
//mShowInSearchCombo = getChild<LLComboBox>("show_in_search");
|
||||
//mHideAgeCombo = getChild<LLComboBox>("hide_age");
|
||||
//mHideAgeCombo = getChild<LLComboBox>("hide_age");
|
||||
mShowInSearchCheckbox = getChild<LLCheckBoxCtrl>("show_in_search");
|
||||
mHideAgeCheckbox = getChild<LLCheckBoxCtrl>("hide_sl_age");
|
||||
// </FS:Ansariel>
|
||||
|
|
@ -1554,35 +1554,26 @@ void LLPanelProfileSecondLife::fillAgeData(const LLAvatarData* avatar_data)
|
|||
getChild<LLUICtrl>("user_age")->setValue(register_date);
|
||||
// </FS:Ansariel>
|
||||
|
||||
BOOL showHideAgeCombo = FALSE;
|
||||
if (getSelfProfile())
|
||||
{
|
||||
// <FS:Ansariel> OpenSim
|
||||
#ifdef OPENSIM
|
||||
if (gAgent.getRegionCapability(PROFILE_IMAGE_UPLOAD_CAP).empty() && LLGridManager::instance().isInOpenSim())
|
||||
if (LLAvatarPropertiesProcessor::getInstance()->isHideAgeSupportedByServer())
|
||||
{
|
||||
mHideAgeCheckbox->setVisible(FALSE);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
// </FS:Ansariel>
|
||||
|
||||
F64 birth = avatar_data->born_on.secondsSinceEpoch();
|
||||
F64 now = LLDate::now().secondsSinceEpoch();
|
||||
if (now - birth > 365 * 24 * 60 * 60)
|
||||
{
|
||||
mHideAge = avatar_data->hide_age;
|
||||
// <FS:Ansariel> Fix LL UI/UX design accident
|
||||
//mHideAgeCombo->setValue(mHideAge ? TRUE : FALSE);
|
||||
mHideAgeCheckbox->setVisible(TRUE);
|
||||
mHideAgeCheckbox->setValue(mHideAge ? FALSE : TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
// <FS:Ansariel> Fix LL UI/UX design accident
|
||||
//mHideAgeCombo->setVisible(FALSE);
|
||||
mHideAgeCheckbox->setVisible(FALSE);
|
||||
F64 birth = avatar_data->born_on.secondsSinceEpoch();
|
||||
F64 now = LLDate::now().secondsSinceEpoch();
|
||||
if (now - birth > 365 * 24 * 60 * 60)
|
||||
{
|
||||
mHideAge = avatar_data->hide_age;
|
||||
// <FS:Ansariel> Fix LL UI/UX design accident
|
||||
//mHideAgeCombo->setValue(mHideAge ? TRUE : FALSE);
|
||||
mHideAgeCheckbox->setValue(mHideAge ? FALSE : TRUE);
|
||||
showHideAgeCombo = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
// <FS:Ansariel> Fix LL UI/UX design accident
|
||||
//mHideAgeCombo->setVisible(showHideAgeCombo);
|
||||
mHideAgeCheckbox->setVisible(showHideAgeCombo);
|
||||
}
|
||||
|
||||
void LLPanelProfileSecondLife::onImageLoaded(BOOL success, LLViewerFetchedTexture *imagep)
|
||||
|
|
|
|||
Loading…
Reference in New Issue