mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -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
|
@ -1410,6 +1410,7 @@ void ChatWidget::clearChatHistory()
|
|||
if (chatType() == CHATTYPE_LOBBY) {
|
||||
if (notify) notify->chatLobbyCleared(chatId.toLobbyId(),"");
|
||||
}
|
||||
rsMsgs->clearChatLobby(chatId);
|
||||
}
|
||||
|
||||
void ChatWidget::deleteChatHistory()
|
||||
|
|
|
@ -519,7 +519,21 @@ void NotifyQt::notifyChatStatus(const ChatId& chat_id,const std::string& status_
|
|||
emit chatStatusChanged(chat_id, QString::fromUtf8(status_string.c_str()));
|
||||
}
|
||||
|
||||
void NotifyQt::notifyTurtleSearchResult(uint32_t search_id,const std::list<TurtleFileInfo>& files)
|
||||
void NotifyQt::notifyChatCleared(const ChatId& chat_id)
|
||||
{
|
||||
{
|
||||
QMutexLocker m(&_mutex) ;
|
||||
if(!_enabled)
|
||||
return ;
|
||||
}
|
||||
|
||||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "notifyQt: Received chat cleared." << std::endl ;
|
||||
#endif
|
||||
emit chatCleared(chat_id);
|
||||
}
|
||||
|
||||
void NotifyQt::notifyTurtleSearchResult(uint32_t search_id,const std::list<TurtleFileInfo>& files)
|
||||
{
|
||||
{
|
||||
QMutexLocker m(&_mutex) ;
|
||||
|
|
|
@ -42,8 +42,9 @@ class NotifyQt: public QObject, public NotifyClient
|
|||
virtual void notifyListPreChange(int list, int type);
|
||||
virtual void notifyListChange(int list, int type);
|
||||
virtual void notifyErrorMsg(int list, int sev, std::string msg);
|
||||
virtual void notifyChatMessage(const ChatMessage& /* msg */);
|
||||
virtual void notifyChatStatus(const ChatId &chat_id,const std::string& status_string);
|
||||
virtual void notifyChatMessage(const ChatMessage& /* msg */);
|
||||
virtual void notifyChatStatus(const ChatId &chat_id,const std::string& status_string);
|
||||
virtual void notifyChatCleared(const ChatId &chat_id);
|
||||
virtual void notifyCustomState(const std::string& peer_id, const std::string& status_string);
|
||||
virtual void notifyHashingInfo(uint32_t type, const std::string& fileinfo);
|
||||
virtual void notifyTurtleSearchResult(uint32_t search_id,const std::list<TurtleFileInfo>& found_files);
|
||||
|
@ -113,7 +114,8 @@ class NotifyQt: public QObject, public NotifyClient
|
|||
#endif
|
||||
void configChanged() const ;
|
||||
void logInfoChanged(const QString&) const ;
|
||||
void chatStatusChanged(const ChatId&,const QString&) const ;
|
||||
void chatStatusChanged(const ChatId&,const QString&) const ;
|
||||
void chatCleared(const ChatId&) const ;
|
||||
void peerHasNewCustomStateString(const QString& /* peer_id */, const QString& /* status_string */) const ;
|
||||
void gotTurtleSearchResult(qulonglong search_id,FileDetail file) const ;
|
||||
void peerHasNewAvatar(const QString& peer_id) const ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue