diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2010-03-19 17:27:54 +0200 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2010-03-19 17:27:54 +0200 |
commit | 2d0ca224ea7a05a38e51979d201e55b7e942c855 (patch) | |
tree | e79c14f4f1e53027b4511b33c813cf847ef0864d /indra/newview/llimfloater.cpp | |
parent | 167be8f755ccc6e4af27cfce25506d666af58c25 (diff) |
fixed EXT-6472 “No indication about new message/offer if IM window is open but not in focus”,
allowed to increment IM message counter when IM window is opened but doesn't have focus and reset IM counter when IM window get focus;
reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/76/
--HG--
branch : product-engine
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()) { |