diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2010-03-19 17:17:00 +0200 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2010-03-19 17:17:00 +0200 |
commit | 63251d8b31b14b55912d9117f1b508db31e52582 (patch) | |
tree | 204791a5862ec1a0d656b62ce27aba17ec046599 /indra | |
parent | 5fa1c1531bbeb23aa76ba605fb7bd30b3f51c6dd (diff) |
opened and fixed EXT-6478 “Loggable messages that not increments IM counter doesn't shows in IM window”,
added update of IM floater messages on logging to IM session;
reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/75/
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llnotificationhandler.h | 5 | ||||
-rw-r--r-- | 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 @@ -357,6 +357,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. */ static void updateVisibleIMFLoaterMesages(const LLNotificationPtr& notification); 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()) { @@ -413,12 +416,8 @@ void LLHandlerUtil::addNotifPanelToIM(const LLNotificationPtr& notification) } // static -void LLHandlerUtil::updateVisibleIMFLoaterMesages(const LLNotificationPtr& notification) +void LLHandlerUtil::updateIMFLoaterMesages(const LLUUID& session_id) { - const std::string name = LLHandlerUtil::getSubstitutionName(notification); - 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()) { @@ -427,6 +426,16 @@ void LLHandlerUtil::updateVisibleIMFLoaterMesages(const LLNotificationPtr& notif } // static +void LLHandlerUtil::updateVisibleIMFLoaterMesages(const LLNotificationPtr& notification) +{ + const std::string name = LLHandlerUtil::getSubstitutionName(notification); + LLUUID from_id = notification->getPayload()["from_id"]; + LLUUID session_id = spawnIMSession(name, from_id); + + updateIMFLoaterMesages(session_id); +} + +// static void LLHandlerUtil::decIMMesageCounter(const LLNotificationPtr& notification) { const std::string name = LLHandlerUtil::getSubstitutionName(notification); |