summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterconversationpreview.cpp
diff options
context:
space:
mode:
authorPaul ProductEngine <pguslisty@productengine.com>2012-09-19 19:20:21 +0300
committerPaul ProductEngine <pguslisty@productengine.com>2012-09-19 19:20:21 +0300
commitfcb010e835d9b894ba6d1012ac8e3a85c5ab3400 (patch)
treec7b94a915c4ed09c863bd9ef13183afc86d6ea6d /indra/newview/llfloaterconversationpreview.cpp
parent86ac47474f42598d3edb65970117b442457f7284 (diff)
CHUI-338 FIXED (LLAvatarNameResponder warning shown in debug console when using spinner to page through chat history viewer)
- Trying to restore avatarID by its name before appending message to chat history. - Also prevented requesting avatar name by null LLUUID in LLAvatarIconCtrl::setValue
Diffstat (limited to 'indra/newview/llfloaterconversationpreview.cpp')
-rw-r--r--indra/newview/llfloaterconversationpreview.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp
index 88efc39764..a3825eafc8 100644
--- a/indra/newview/llfloaterconversationpreview.cpp
+++ b/indra/newview/llfloaterconversationpreview.cpp
@@ -29,6 +29,7 @@
#include "llfloaterconversationpreview.h"
#include "llimview.h"
#include "lllineeditor.h"
+#include "llnearbychat.h"
#include "llspinctrl.h"
#include "lltrans.h"
@@ -43,7 +44,6 @@ LLFloaterConversationPreview::LLFloaterConversationPreview(const LLSD& session_i
BOOL LLFloaterConversationPreview::postBuild()
{
mChatHistory = getChild<LLChatHistory>("chat_history");
- getChild<LLUICtrl>("more_history")->setCommitCallback(boost::bind(&LLFloaterConversationPreview::onMoreHistoryBtnClick, this));
const LLConversation* conv = LLConversationLog::instance().getConversation(mSessionID);
std::string name;
@@ -119,20 +119,39 @@ void LLFloaterConversationPreview::showHistory()
{
LLSD msg = *iter;
+ LLUUID from_id = LLUUID::null;
std::string time = msg["time"].asString();
- LLUUID from_id = msg["from_id"].asUUID();
std::string from = msg["from"].asString();
std::string message = msg["message"].asString();
- bool is_history = msg["is_history"].asBoolean();
+
+ if (msg["from_id"].isDefined())
+ {
+ from_id = msg["from_id"].asUUID();
+ }
+ else
+ {
+ std::string legacy_name = gCacheName->buildLegacyName(from);
+ gCacheName->getUUID(legacy_name, from_id);
+ }
LLChat chat;
chat.mFromID = from_id;
chat.mSessionID = mSessionID;
chat.mFromName = from;
chat.mTimeStr = time;
- chat.mChatStyle = is_history ? CHAT_STYLE_HISTORY : chat.mChatStyle;
+ chat.mChatStyle = CHAT_STYLE_HISTORY;
chat.mText = message;
+ if (from_id.isNull() && SYSTEM_FROM == from)
+ {
+ chat.mSourceType = CHAT_SOURCE_SYSTEM;
+
+ }
+ else if (from_id.isNull())
+ {
+ chat.mSourceType = LLNearbyChat::isWordsName(from) ? CHAT_SOURCE_UNKNOWN : CHAT_SOURCE_OBJECT;
+ }
+
mChatHistory->appendMessage(chat);
}