summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorIgor Borovkov <iborovkov@productengine.com>2009-11-06 17:03:48 +0200
committerIgor Borovkov <iborovkov@productengine.com>2009-11-06 17:03:48 +0200
commita3830dee59e9014605746b3425e5378b64c584fe (patch)
tree6f4b0d3e654211848f972b2528edb76cec19ac35 /indra/newview
parentddb42652e3205a96289ad4ac8031a022cce46c4a (diff)
implement normal subtask EXT-2265 IM unread messages counter should not be increased for system messages (comming from 'Second Life', zero uuid)
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llimfloater.cpp2
-rw-r--r--indra/newview/llimview.cpp4
-rw-r--r--indra/newview/llimview.h3
3 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 83e1a333f7..a634a1b0fd 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -115,7 +115,7 @@ void LLIMFloater::onClose(bool app_quitting)
/* static */
void LLIMFloater::newIMCallback(const LLSD& data){
- if (data["num_unread"].asInteger() > 0)
+ if (data["num_unread"].asInteger() > 0 || data["from_id"].asUUID().isNull())
{
LLUUID session_id = data["session_id"].asUUID();
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 4f844ed8c8..ac5bd719e2 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -134,7 +134,6 @@ void LLIMModel::setActiveSessionID(const LLUUID& session_id)
LLIMModel::LLIMModel()
{
addNewMsgCallback(LLIMFloater::newIMCallback);
- addNoUnreadMsgsCallback(LLIMFloater::newIMCallback);
addNewMsgCallback(toast_callback);
}
@@ -440,7 +439,8 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co
addToHistory(session_id, from, from_id, utf8_text);
if (log2file) logToFile(session_id, from, from_id, utf8_text);
- session->mNumUnread++;
+ //we do not count system messages
+ if (from_id.notNull()) session->mNumUnread++;
// notify listeners
LLSD arg;
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 769d49f388..bd55bd2c30 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -66,7 +66,10 @@ public:
EInstantMessage mType;
LLUUID mOtherParticipantID;
std::vector<LLUUID> mInitialTargetIDs;
+
+ //does NOT include system messages
S32 mNumUnread;
+
std::list<LLSD> mMsgs;
LLVoiceChannel* mVoiceChannel;