mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
Clear WebAPI when clear chat history in GUI.
Move notifyChatCleared call to p3ChatService To maintain notify direction.
This commit is contained in:
parent
ab78825966
commit
c6f1cc4e63
14 changed files with 78 additions and 27 deletions
|
@ -167,6 +167,13 @@ void ChatHandler::notifyChatMessage(const ChatMessage &msg)
|
|||
mRawMsgs.push_back(msg);
|
||||
}
|
||||
|
||||
void ChatHandler::notifyChatCleared(const ChatId &chat_id)
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx); /********** LOCKED **********/
|
||||
std::list<Msg>& msgs = mMsgs[chat_id];
|
||||
msgs.clear();
|
||||
}
|
||||
|
||||
void ChatHandler::notifyChatStatus(const ChatId &chat_id, const std::string &status)
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx); /********** LOCKED **********/
|
||||
|
|
|
@ -25,6 +25,7 @@ public:
|
|||
// from NotifyClient
|
||||
// note: this may get called from the own and from foreign threads
|
||||
virtual void notifyChatMessage(const ChatMessage& msg);
|
||||
virtual void notifyChatCleared(const ChatId& chat_id);
|
||||
|
||||
// typing label for peer, broadcast and distant chat
|
||||
virtual void notifyChatStatus (const ChatId& /* chat_id */, const std::string& /* status_string */);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue