added saving of nearby chat history - EXT-4777 Implement saving and loading chat history for Nearby Chat (both plain text and widgeted chat)
--HG-- branch : product-enginemaster
parent
f69510e20c
commit
0763fac765
|
|
@ -200,6 +200,18 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args)
|
|||
mMessageArchive.push_back(chat);
|
||||
if(mMessageArchive.size()>200)
|
||||
mMessageArchive.erase(mMessageArchive.begin());
|
||||
|
||||
if (gSavedPerAccountSettings.getBOOL("LogChat"))
|
||||
{
|
||||
if (chat.mChatType != CHAT_TYPE_WHISPER && chat.mChatType != CHAT_TYPE_SHOUT)
|
||||
{
|
||||
LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLLogChat::saveHistory("chat", "", chat.mFromID, chat.mFromName + " " + chat.mText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ public:
|
|||
~LLNearbyChat();
|
||||
|
||||
BOOL postBuild ();
|
||||
|
||||
/** @param archive true - to save a message to the chat history log */
|
||||
void addMessage (const LLChat& message,bool archive = true, const LLSD &args = LLSD());
|
||||
void onNearbyChatContextMenuItemClicked(const LLSD& userdata);
|
||||
bool onNearbyChatCheckContextMenuItem(const LLSD& userdata);
|
||||
|
|
|
|||
Loading…
Reference in New Issue