summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimnearbychat.cpp
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2013-01-29 00:19:05 +0000
committerCho <cho@lindenlab.com>2013-01-29 00:19:05 +0000
commitf9d44737b780542c4f4e3f02122b0cf9fb0fd8c6 (patch)
tree288ba6cb91c0f3e617b0327146bc73773912a58f /indra/newview/llfloaterimnearbychat.cpp
parent427725c2a6d5c50468e7579a4d3b92795425723f (diff)
parentaf969270990ca719277def274b8ebf20539cc435 (diff)
merging latest changes
Diffstat (limited to 'indra/newview/llfloaterimnearbychat.cpp')
-rw-r--r--indra/newview/llfloaterimnearbychat.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 73eb822036..a01578fa22 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -150,8 +150,14 @@ void LLFloaterIMNearbyChat::refresh()
}
}
-void LLFloaterIMNearbyChat::reloadMessages()
+void LLFloaterIMNearbyChat::reloadMessages(bool clean_messages/* = false*/)
{
+ if (clean_messages)
+ {
+ mMessageArchive.clear();
+ loadHistory();
+ }
+
mChatHistory->clear();
LLSD do_not_log;
@@ -176,11 +182,11 @@ void LLFloaterIMNearbyChat::loadHistory()
{
const LLSD& msg = *it;
- std::string from = msg[IM_FROM];
+ std::string from = msg[LL_IM_FROM];
LLUUID from_id;
- if (msg[IM_FROM_ID].isDefined())
+ if (msg[LL_IM_FROM_ID].isDefined())
{
- from_id = msg[IM_FROM_ID].asUUID();
+ from_id = msg[LL_IM_FROM_ID].asUUID();
}
else
{
@@ -191,8 +197,8 @@ void LLFloaterIMNearbyChat::loadHistory()
LLChat chat;
chat.mFromName = from;
chat.mFromID = from_id;
- chat.mText = msg[IM_TEXT].asString();
- chat.mTimeStr = msg[IM_TIME].asString();
+ chat.mText = msg[LL_IM_TEXT].asString();
+ chat.mTimeStr = msg[LL_IM_TIME].asString();
chat.mChatStyle = CHAT_STYLE_HISTORY;
chat.mSourceType = CHAT_SOURCE_AGENT;
@@ -521,20 +527,21 @@ void LLFloaterIMNearbyChat::sendChat( EChatType type )
}
}
-void LLFloaterIMNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args)
+void LLFloaterIMNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args)
{
appendMessage(chat, args);
if(archive)
{
mMessageArchive.push_back(chat);
- if(mMessageArchive.size()>200)
+ if(mMessageArchive.size() > 200)
+ {
mMessageArchive.erase(mMessageArchive.begin());
+ }
}
// logging
- if (!args["do_not_log"].asBoolean()
- && gSavedPerAccountSettings.getBOOL("LogNearbyChat"))
+ if (!args["do_not_log"].asBoolean() && gSavedSettings.getS32("KeepConversationLogTranscripts") > 1)
{
std::string from_name = chat.mFromName;