summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
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;