diff options
author | Kent Quirk <q@lindenlab.com> | 2010-03-19 12:05:15 -0400 |
---|---|---|
committer | Kent Quirk <q@lindenlab.com> | 2010-03-19 12:05:15 -0400 |
commit | 1e50e4a13a37a236470e088c32c40ff62d46d497 (patch) | |
tree | 08c0d4ee106f40e8f2d11ab89df83bae7a6704f4 /indra/newview/llimfloater.cpp | |
parent | 637105e5cf346e5a88fe5820f36f6233b404d5aa (diff) | |
parent | 7d50a19d6cb46b60ba005280223522672736592d (diff) |
Merge
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r-- | indra/newview/llimfloater.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index f0e195c37a..91f4f57e54 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -128,6 +128,11 @@ void LLIMFloater::onFocusReceived() LLIMModel::getInstance()->setActiveSessionID(mSessionID); LLBottomTray::getInstance()->getChicletPanel()->setChicletToggleState(mSessionID, true); + + if (getVisible()) + { + LLIMModel::instance().sendNoUnreadMessages(mSessionID); + } } // virtual @@ -609,7 +614,16 @@ void LLIMFloater::updateMessages() bool use_plain_text_chat_history = gSavedSettings.getBOOL("PlainTextChatHistory"); std::list<LLSD> messages; - LLIMModel::instance().getMessages(mSessionID, messages, mLastMessageIndex+1); + + // we shouldn't reset unread message counters if IM floater doesn't have focus + if (hasFocus()) + { + LLIMModel::instance().getMessages(mSessionID, messages, mLastMessageIndex+1); + } + else + { + LLIMModel::instance().getMessagesSilently(mSessionID, messages, mLastMessageIndex+1); + } if (messages.size()) { |