diff options
author | Eugene Mutavchi <emutavchi@productengine.com> | 2010-02-19 13:36:47 +0200 |
---|---|---|
committer | Eugene Mutavchi <emutavchi@productengine.com> | 2010-02-19 13:36:47 +0200 |
commit | 10c5f2f080b47561db2b1f9a2f063ad8dcc175b9 (patch) | |
tree | 9456200b7c607b40ad51e512742031f2b0707797 /indra/newview/llimview.cpp | |
parent | 36f8239fe1ed4b9de6dd8221bc12fd766e531436 (diff) |
Implemented low task EXT-5215 (Disable showing full yyyy/mm/dd timestamp for messages (nearby chat/im) received today)
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r-- | indra/newview/llimview.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 77e3012d26..faddffe0fc 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -357,7 +357,7 @@ void LLIMModel::LLIMSession::sessionInitReplyReceived(const LLUUID& new_session_ } } -void LLIMModel::LLIMSession::addMessage(const std::string& from, const LLUUID& from_id, const std::string& utf8_text, const std::string& time) +void LLIMModel::LLIMSession::addMessage(const std::string& from, const LLUUID& from_id, const std::string& utf8_text, const std::string& time, const bool is_history) { LLSD message; message["from"] = from; @@ -365,6 +365,7 @@ void LLIMModel::LLIMSession::addMessage(const std::string& from, const LLUUID& f message["message"] = utf8_text; message["time"] = time; message["index"] = (LLSD::Integer)mMsgs.size(); + message["is_history"] = is_history; mMsgs.push_front(message); @@ -393,7 +394,7 @@ void LLIMModel::LLIMSession::addMessagesFromHistory(const std::list<LLSD>& histo std::string timestamp = msg[IM_TIME]; std::string text = msg[IM_TEXT]; - addMessage(from, from_id, text, timestamp); + addMessage(from, from_id, text, timestamp, true); it++; } @@ -407,11 +408,11 @@ void LLIMModel::LLIMSession::chatFromLogFile(LLLogChat::ELogLineType type, const if (type == LLLogChat::LOG_LINE) { - self->addMessage("", LLSD(), msg["message"].asString(), ""); + self->addMessage("", LLSD(), msg["message"].asString(), "", true); } else if (type == LLLogChat::LOG_LLSD) { - self->addMessage(msg["from"].asString(), msg["from_id"].asUUID(), msg["message"].asString(), msg["time"].asString()); + self->addMessage(msg["from"].asString(), msg["from_id"].asUUID(), msg["message"].asString(), msg["time"].asString(), true); } } |