summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-03-19 17:18:52 +0200
committerAlexei Arabadji <aarabadji@productengine.com>2010-03-19 17:18:52 +0200
commit167be8f755ccc6e4af27cfce25506d666af58c25 (patch)
treeac6598f2b58b90672f967861e4d84053fe188942
parentd217adeede2d99ac6f48064388d91aa14ab9a4d2 (diff)
parent63251d8b31b14b55912d9117f1b508db31e52582 (diff)
Automated merge with https://hg.productengine.com/secondlife/viewer-2-0/
--HG-- branch : product-engine
-rw-r--r--indra/newview/llnotificationhandler.h5
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp19
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 5affd5c677..55e0f33121 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())
{
@@ -415,12 +418,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())
{
@@ -429,6 +428,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);