diff options
Diffstat (limited to 'Swift/Controllers/Chat/ChatsManager.cpp')
| -rw-r--r-- | Swift/Controllers/Chat/ChatsManager.cpp | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp index 83f66a3..edc1a79 100644 --- a/Swift/Controllers/Chat/ChatsManager.cpp +++ b/Swift/Controllers/Chat/ChatsManager.cpp @@ -86,6 +86,7 @@ ChatsManager::ChatsManager(  	chatListWindow_ = chatListWindowFactory->createChatListWindow(uiEventStream_);  	chatListWindow_->onMUCBookmarkActivated.connect(boost::bind(&ChatsManager::handleMUCBookmarkActivated, this, _1));  	chatListWindow_->onRecentActivated.connect(boost::bind(&ChatsManager::handleRecentActivated, this, _1)); +	chatListWindow_->onClearRecentsRequested.connect(boost::bind(&ChatsManager::handleClearRecentsRequested, this));  	joinMUCWindow_ = NULL;  	mucSearchController_ = new MUCSearchController(jid_, mucSearchWindowFactory, iqRouter, settings); @@ -126,6 +127,12 @@ void ChatsManager::saveRecents() {  	profileSettings_->storeString(RECENT_CHATS, recents);  } +void ChatsManager::handleClearRecentsRequested() { +	recentChats_.clear(); +	saveRecents(); +	handleUnreadCountChanged(NULL); +} +  void ChatsManager::loadRecents() {  	std::string recentsString(profileSettings_->getStringSetting(RECENT_CHATS));  	std::vector<std::string> recents; | 
 Swift
 Swift