diff options
author | Igor Borovkov <iborovkov@productengine.com> | 2009-12-17 19:07:01 +0200 |
---|---|---|
committer | Igor Borovkov <iborovkov@productengine.com> | 2009-12-17 19:07:01 +0200 |
commit | 2fc7c967a473fc9b076d401cef8718a59f80052b (patch) | |
tree | 54b100d6a083609c75c1d7992b352deb5f2ba35c /indra/newview | |
parent | e0855e524941e476950eb17510503284079229da (diff) |
corrected IM well counter EXT-2884 Initiation of a voice call should not bring text chat (p2p, ad-hoc, group)
Now IM Well counter displays unread messages calculating it based on chiclets instead of displaying unread messages across all IM Model
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llbottomtray.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llbottomtray.h | 2 | ||||
-rw-r--r-- | indra/newview/llchiclet.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llchiclet.h | 2 |
4 files changed, 24 insertions, 2 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 8389895479..6f2e666cc7 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -215,6 +215,10 @@ void LLBottomTray::onNewIM(const LLSD& data) } } +S32 LLBottomTray::getTotalUnreadIMCount() +{ + return getChicletPanel()->getTotalUnreadIMCount(); +} // virtual void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, bool proximal) diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 209fa7cca1..5cd3f15746 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -77,6 +77,8 @@ public: void onNewIM(const LLSD& data); + S32 getTotalUnreadIMCount(); + virtual void reshape(S32 width, S32 height, BOOL called_from_parent); virtual void onFocusLost(); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index c7f77810df..c6fe076911 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -250,8 +250,7 @@ LLIMWellChiclet::~LLIMWellChiclet() void LLIMWellChiclet::messageCountChanged(const LLSD& session_data) { - S32 total_unread = LLIMMgr::instance().getNumberOfUnreadParticipantMessages(); - setCounter(total_unread); + setCounter(LLBottomTray::getInstance()->getTotalUnreadIMCount()); } /************************************************************************/ @@ -1529,6 +1528,21 @@ bool LLChicletPanel::isAnyIMFloaterDoked() return res; } +S32 LLChicletPanel::getTotalUnreadIMCount() +{ + S32 count = 0; + chiclet_list_t::const_iterator it = mChicletList.begin(); + for( ; mChicletList.end() != it; ++it) + { + LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*it); + if(chiclet) + { + count += chiclet->getCounter(); + } + } + return count; +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 353fc01c34..b3341f78a8 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -963,6 +963,8 @@ public: S32 getMinWidth() const { return mMinWidth; } + S32 getTotalUnreadIMCount(); + protected: LLChicletPanel(const Params&p); friend class LLUICtrlFactory; |