diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-30 10:10:16 +0100 |
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-30 10:10:16 +0100 |
| commit | 6f339d5e9eb0a43f70effdf069d414e0ee7fff2c (patch) | |
| tree | c8070823806fbeb68ea0813d9a766a1b1db458f2 /indra/newview/llimfloater.cpp | |
| parent | 4f46e777a501ff0bfedaf657ac6decdeba8acbe5 (diff) | |
| parent | d597a7e36a0a8c4cbee70b053c41aa01afeab6b5 (diff) | |
merge from viewer-trunk
Diffstat (limited to 'indra/newview/llimfloater.cpp')
| -rw-r--r-- | indra/newview/llimfloater.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 19dbc564d1..c0cc3f1985 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -53,6 +53,7 @@ #include "llsyswellwindow.h" #include "lltrans.h" #include "llchathistory.h" +#include "llnotifications.h" #include "llviewerwindow.h" #include "llvoicechannel.h" #include "lltransientfloatermgr.h" @@ -371,6 +372,8 @@ void LLIMFloater::onSlide() //static LLIMFloater* LLIMFloater::show(const LLUUID& session_id) { + closeHiddenIMToasts(); + if (!gIMMgr->hasSession(session_id)) return NULL; if(!isChatMultiTab()) @@ -1084,6 +1087,26 @@ void LLIMFloater::removeTypingIndicator(const LLIMInfo* im_info) } // static +void LLIMFloater::closeHiddenIMToasts() +{ + class IMToastMatcher: public LLNotificationsUI::LLScreenChannel::Matcher + { + public: + bool matches(const LLNotificationPtr notification) const + { + // "notifytoast" type of notifications is reserved for IM notifications + return "notifytoast" == notification->getType(); + } + }; + + LLNotificationsUI::LLScreenChannel* channel = LLNotificationsUI::LLChannelManager::getNotificationScreenChannel(); + if (channel != NULL) + { + channel->closeHiddenToasts(IMToastMatcher()); + } +} + +// static bool LLIMFloater::isChatMultiTab() { // Restart is required in order to change chat window type. |
