From 2fc7c967a473fc9b076d401cef8718a59f80052b Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 17 Dec 2009 19:07:01 +0200 Subject: 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 --- indra/newview/llchiclet.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'indra/newview/llchiclet.cpp') 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(*it); + if(chiclet) + { + count += chiclet->getCounter(); + } + } + return count; +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3