summaryrefslogtreecommitdiff
path: root/indra/newview/lllogchat.cpp
diff options
context:
space:
mode:
authorPaul ProductEngine <pguslisty@productengine.com>2012-08-28 14:48:32 +0300
committerPaul ProductEngine <pguslisty@productengine.com>2012-08-28 14:48:32 +0300
commitd4ee17e533d652e90989e60bcbc097c81e73d081 (patch)
treed1782ac876502d12455e8bff3981ba60aae3737e /indra/newview/lllogchat.cpp
parenta1a1410d25c3e4ff87e33344b416b7a827cdb1c2 (diff)
CHUI-275 FIXED (Chat history viewer does not show entire user.txt IM log file)
- Renamed LLLogChat::loadAllHistory to LLLogChat::loadChatHistory because it doesn't actually loads all history. Also added parameter to the function which is a flag whether to load all file's content or not. - Implemented displaying history by pages (as was decided on meeting page): Added showHistory() method to the LLFloaterConversationPreview which shows the chat history page by page starting from the last conversation (or may say starting from the last page). One page contains 100 entries. Added "More history..." button to display next page of history.
Diffstat (limited to 'indra/newview/lllogchat.cpp')
-rw-r--r--indra/newview/lllogchat.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index ebb5912ace..073f5f00c5 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -387,7 +387,7 @@ void append_to_last_message(std::list<LLSD>& messages, const std::string& line)
}
// static
-void LLLogChat::loadAllHistory(const std::string& file_name, std::list<LLSD>& messages)
+void LLLogChat::loadChatHistory(const std::string& file_name, std::list<LLSD>& messages, bool load_all_history/*= false*/)
{
if (file_name.empty())
{
@@ -412,8 +412,8 @@ void LLLogChat::loadAllHistory(const std::string& file_name, std::list<LLSD>& me
S32 len;
bool firstline = TRUE;
- if (fseek(fptr, (LOG_RECALL_SIZE - 1) * -1 , SEEK_END))
- { //File is smaller than recall size. Get it all.
+ if (load_all_history || fseek(fptr, (LOG_RECALL_SIZE - 1) * -1 , SEEK_END))
+ { //We need to load the whole historyFile or it's smaller than recall size, so get it all.
firstline = FALSE;
if (fseek(fptr, 0, SEEK_SET))
{