Work on normal task EXT-3148 (Implement updating of the IM Well message counter). Completed

-- added updating count of unread messages in IM Well counter while closing any session.

--HG--
branch : product-engine
master
Mike Antipov 2009-12-07 14:39:34 +02:00
parent fdb25e5add
commit 0445b02f35
2 changed files with 15 additions and 1 deletions

View File

@ -135,6 +135,13 @@ LLIMWellChiclet::LLIMWellChiclet(const Params& p)
{
LLIMModel::instance().addNewMsgCallback(boost::bind(&LLIMWellChiclet::messageCountChanged, this, _1));
LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(&LLIMWellChiclet::messageCountChanged, this, _1));
LLIMMgr::getInstance()->addSessionObserver(this);
}
LLIMWellChiclet::~LLIMWellChiclet()
{
LLIMMgr::getInstance()->removeSessionObserver(this);
}
void LLIMWellChiclet::messageCountChanged(const LLSD& session_data)

View File

@ -39,6 +39,7 @@
#include "lltextbox.h"
#include "lloutputmonitorctrl.h"
#include "llgroupmgr.h"
#include "llimview.h"
class LLVoiceControlPanel;
class LLMenuGL;
@ -787,9 +788,15 @@ protected:
*
* It displays a count of unread messages from other participants in all IM sessions.
*/
class LLIMWellChiclet : public LLSysWellChiclet
class LLIMWellChiclet : public LLSysWellChiclet, LLIMSessionObserver
{
friend class LLUICtrlFactory;
public:
virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {}
virtual void sessionRemoved(const LLUUID& session_id) { messageCountChanged(LLSD()); }
virtual void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) {}
~LLIMWellChiclet();
protected:
LLIMWellChiclet(const Params& p);