Commits

Anonymous committed 8c8d84f

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

  • Participants
  • Parent commits a548166
  • Branches product-engine

Comments (0)

Files changed (4)

File indra/newview/llbottomtray.cpp

 	}
 }
 
+S32 LLBottomTray::getTotalUnreadIMCount()
+{
+	return getChicletPanel()->getTotalUnreadIMCount();
+}
 
 // virtual
 void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, bool proximal)

File indra/newview/llbottomtray.h

 
 	void onNewIM(const LLSD& data);
 
+	S32 getTotalUnreadIMCount();
+
 	virtual void reshape(S32 width, S32 height, BOOL called_from_parent);
 
 	virtual void onFocusLost();

File indra/newview/llchiclet.cpp

 
 void LLIMWellChiclet::messageCountChanged(const LLSD& session_data)
 {
-	S32 total_unread = LLIMMgr::instance().getNumberOfUnreadParticipantMessages();
-	setCounter(total_unread);
+	setCounter(LLBottomTray::getInstance()->getTotalUnreadIMCount());
 }
 
 /************************************************************************/
 	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;
+}
+
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////

File indra/newview/llchiclet.h

 
 	S32 getMinWidth() const { return mMinWidth; }
 
+	S32 getTotalUnreadIMCount();
+
 protected:
 	LLChicletPanel(const Params&p);
 	friend class LLUICtrlFactory;