Skip to content
Snippets Groups Projects
Commit 4bf428c4 authored by Yuri Chebotarev's avatar Yuri Chebotarev
Browse files

fix major EXT-3003 IM messages loaded from a chat history are displayed with current time

--HG--
branch : product-engine
parent 09d6eece
No related branches found
No related tags found
No related merge requests found
...@@ -267,30 +267,13 @@ class LLChatHistoryHeader: public LLPanel ...@@ -267,30 +267,13 @@ class LLChatHistoryHeader: public LLPanel
} }
private: private:
std::string appendTime(const LLChat& chat)
{
time_t utc_time;
utc_time = time_corrected();
std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:["
+LLTrans::getString("TimeMin")+"] ";
LLSD substitution;
substitution["datetime"] = (S32) utc_time;
LLStringUtil::format (timeStr, substitution);
return timeStr;
}
void setTimeField(const LLChat& chat) void setTimeField(const LLChat& chat)
{ {
LLTextBox* time_box = getChild<LLTextBox>("time_box"); LLTextBox* time_box = getChild<LLTextBox>("time_box");
LLRect rect_before = time_box->getRect(); LLRect rect_before = time_box->getRect();
std::string time_value = appendTime(chat); time_box->setValue(chat.mTimeStr);
time_box->setValue(time_value);
// set necessary textbox width to fit all text // set necessary textbox width to fit all text
time_box->reshapeToFitText(); time_box->reshapeToFitText();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment