From 63251d8b31b14b55912d9117f1b508db31e52582 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 19 Mar 2010 17:17:00 +0200 Subject: [PATCH] =?UTF-8?q?opened=20and=20fixed=20EXT-6478=20=E2=80=9CLogg?= =?UTF-8?q?able=20messages=20that=20not=20increments=20IM=20counter=20does?= =?UTF-8?q?n't=20shows=20in=20IM=20window=E2=80=9D,=20added=20update=20of?= =?UTF-8?q?=20IM=20floater=20messages=20on=20logging=20to=20IM=20session;?= =?UTF-8?q?=20reviewed=20by=20Mike=20Antipov=20at=20https://codereview.pro?= =?UTF-8?q?ductengine.com/secondlife/r/75/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llnotificationhandler.h | 5 +++++ indra/newview/llnotificationhandlerutil.cpp | 19 ++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 62daf5f105..62008b91a0 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -356,6 +356,11 @@ public: */ static void addNotifPanelToIM(const LLNotificationPtr& notification); + /** + * Updates messages of IM floater. + */ + static void updateIMFLoaterMesages(const LLUUID& session_id); + /** * Updates messages of visible IM floater. */ diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index ae41e673bf..6d4c360f08 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -252,6 +252,9 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type, session->mNumUnread = unread; session->mParticipantUnreadMessageCount = participant_unread; + // update IM floater messages + updateIMFLoaterMesages(session_id); + // restore active session id if (active_session_id.isNull()) { @@ -412,6 +415,16 @@ void LLHandlerUtil::addNotifPanelToIM(const LLNotificationPtr& notification) LLIMModel::getInstance()->mNewMsgSignal(arg); } +// static +void LLHandlerUtil::updateIMFLoaterMesages(const LLUUID& session_id) +{ + LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); + if (im_floater != NULL && im_floater->getVisible()) + { + im_floater->updateMessages(); + } +} + // static void LLHandlerUtil::updateVisibleIMFLoaterMesages(const LLNotificationPtr& notification) { @@ -419,11 +432,7 @@ void LLHandlerUtil::updateVisibleIMFLoaterMesages(const LLNotificationPtr& notif LLUUID from_id = notification->getPayload()["from_id"]; LLUUID session_id = spawnIMSession(name, from_id); - LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); - if (im_floater != NULL && im_floater->getVisible()) - { - im_floater->updateMessages(); - } + updateIMFLoaterMesages(session_id); } // static