FIRE-11330 Part 1 - Don't style chat name slurls as html links

meow-7.2.2
Cinders 2013-08-21 13:12:29 -06:00
parent ff86c59295
commit 490f6bc1cc
6 changed files with 13 additions and 9 deletions

View File

@ -550,10 +550,7 @@ void LLAvatarNameCache::idle()
bool LLAvatarNameCache::isRequestPending(const LLUUID& agent_id)
{
bool isPending = false;
// AO SL timeout is too long
//const F64 PENDING_TIMEOUT_SECS = 5.0 * 60.0;
const F64 PENDING_TIMEOUT_SECS = 60.0;
const F64 PENDING_TIMEOUT_SECS = 5.0 * 60.0;
pending_queue_t::const_iterator it = sPendingQueue.find(agent_id);
if (it != sPendingQueue.end())
@ -661,7 +658,6 @@ LLAvatarNameCache::callback_connection_t LLAvatarNameCache::get(const LLUUID& ag
{
LLAvatarName& av_name = it->second;
LLSD test = av_name.asLLSD();
LL_DEBUGS("AvNameCache") << "DN cache hit for :" << test["display_name"].asString()+" (" + test["legacy_first_name"].asString()+" "+test["legacy_last_name"].asString()+")" << llendl;
if(LGGContactSets::getInstance()->hasPseudonym(agent_id))
{

View File

@ -41,7 +41,8 @@ LLStyle::Params::Params()
font("font", LLFontGL::getFontMonospace()),
image("image"),
link_href("href"),
is_link("is_link")
is_link("is_link"),
is_name_slurl("is_name_slurl") // <FS:CR> FIRE-11330
{}

View File

@ -48,6 +48,7 @@ public:
Optional<LLUIImage*> image;
Optional<std::string> link_href;
Optional<bool> is_link;
Optional<bool> is_name_slurl; // <FS:CR> FIRE-11330
Params();
};
LLStyle(const Params& p = Params());

View File

@ -2122,7 +2122,9 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
end = match.getEnd()+1;
LLStyle::Params link_params(style_params);
link_params.overwriteFrom(match.getStyle());
// <FS:CR> FIRE-11330 - if it's a name, don't stylize it like a url
if (!input_params.is_name_slurl)
link_params.overwriteFrom(match.getStyle());
// output the text before the Url
if (start > 0)

View File

@ -1035,6 +1035,9 @@ void FSChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
{
LLStyle::Params link_params(body_message_params);
link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID));
link_params.is_name_slurl = true;
link_params.color = name_color;
link_params.readonly_color = name_color;
if (from_me && gSavedSettings.getBOOL("FSChatHistoryShowYou"))
{

View File

@ -42,8 +42,9 @@ const LLStyle::Params &LLStyleMap::lookupAgent(const LLUUID &source)
LLStyle::Params style_params;
if (source != LLUUID::null)
{
style_params.color.control = "HTMLLinkColor";
style_params.readonly_color.control = "HTMLLinkColor";
// <FS:CR> FIRE-11330 - Let chat history decide
//style_params.color.control = "HTMLLinkColor";
//style_params.readonly_color.control = "HTMLLinkColor";
style_params.link_href = LLSLURL("agent", source, "inspect").getSLURLString();
}
mMap[source] = style_params;