SL-10790 Don't show excessive information on the Profile Feed tab

master
AndreyL ProductEngine 2019-11-13 09:31:26 +02:00
parent b00d6c025c
commit b1ac8092ee
3 changed files with 10 additions and 15 deletions

View File

@ -83,12 +83,13 @@ const U32 KICK_FLAGS_FREEZE = 1 << 0;
const U32 KICK_FLAGS_UNFREEZE = 1 << 1;
std::string getProfileURL(const std::string& agent_name)
std::string getProfileURL(const std::string& agent_name, bool feed_only)
{
std::string url = "[WEB_PROFILE_URL][AGENT_NAME]";
std::string url = "[WEB_PROFILE_URL][AGENT_NAME][FEED_ONLY]";
LLSD subs;
subs["WEB_PROFILE_URL"] = LLGridManager::getInstance()->getWebProfileURL();
subs["AGENT_NAME"] = agent_name;
subs["FEED_ONLY"] = feed_only ? "/?feed_only=true" : "";
url = LLWeb::expandURLSubstitutions(url, subs);
LLStringUtil::toLower(url);
return url;

View File

@ -38,7 +38,7 @@ class LLInventoryPanel;
class LLFloater;
class LLView;
std::string getProfileURL(const std::string& agent_name);
std::string getProfileURL(const std::string& agent_name, bool feed_only = false);
/**
* Friend-related actions (add, remove, offer teleport, etc)

View File

@ -904,16 +904,13 @@ void LLPanelProfileWeb::apply(LLAvatarData* data)
void LLPanelProfileWeb::updateData()
{
LLUUID avatar_id = getAvatarId();
if (!getIsLoading() && avatar_id.notNull())
if (!getIsLoading() && avatar_id.notNull() && !mURLWebProfile.empty())
{
setIsLoading();
if (!mURLWebProfile.empty())
{
mWebBrowser->setVisible(TRUE);
mPerformanceTimer.start();
mWebBrowser->navigateTo(mURLWebProfile, HTTP_CONTENT_TEXT_HTML);
}
mWebBrowser->setVisible(TRUE);
mPerformanceTimer.start();
mWebBrowser->navigateTo(mURLWebProfile, HTTP_CONTENT_TEXT_HTML);
}
}
@ -931,17 +928,14 @@ void LLPanelProfileWeb::onAvatarNameCache(const LLUUID& agent_id, const LLAvatar
LLStringUtil::replaceChar(username, ' ', '.');
}
mURLWebProfile = getProfileURL(username);
mURLWebProfile = getProfileURL(username, true);
if (mURLWebProfile.empty())
{
return;
}
//if the tab was opened before name was resolved, load the panel now
if (getIsLoading())
{
updateData();
}
updateData();
}
void LLPanelProfileWeb::onCommitLoad(LLUICtrl* ctrl)