diff options
| author | Alexei Arabadji <aarabadji@productengine.com> | 2010-03-04 11:35:34 +0200 |
|---|---|---|
| committer | Alexei Arabadji <aarabadji@productengine.com> | 2010-03-04 11:35:34 +0200 |
| commit | f54bf2a1eac3bc61222e5cceba77755bd340f996 (patch) | |
| tree | 4d6062c4cffac8b2995f1bd19f09029868ce65c2 /indra/newview/llimfloater.cpp | |
| parent | e84e440adc8aa24fc9c4a4c20aa6b82be71e9e60 (diff) | |
fixed EXT-5904 “Offers embedding into IM windows”,
made all type offers be embedded to the IM floater;
made showing offer toast if IM floater isn't visible;
corrected IM message counter on showing offer toast;
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llimfloater.cpp')
| -rw-r--r-- | indra/newview/llimfloater.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 8cdc50eb70..5f56690d2e 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -648,6 +648,15 @@ void LLIMFloater::updateMessages() if (msg.has("notification_id")) { chat.mNotifId = msg["notification_id"].asUUID(); + // remove embedded notification from channel + LLNotificationsUI::LLScreenChannel* channel = dynamic_cast<LLNotificationsUI::LLScreenChannel*> + (LLNotificationsUI::LLChannelManager::getInstance()-> + findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); + if (getVisible()) + { + // toast will be automatically closed since it is not storable toast + channel->hideToast(chat.mNotifId); + } } //process text message else @@ -657,6 +666,19 @@ void LLIMFloater::updateMessages() mChatHistory->appendMessage(chat, chat_args); mLastMessageIndex = msg["index"].asInteger(); + + // if it is a notification - next message is a notification history log, so skip it + if (chat.mNotifId.notNull() && LLNotificationsUtil::find(chat.mNotifId) != NULL) + { + if (++iter == iter_end) + { + break; + } + else + { + mLastMessageIndex++; + } + } } } } |
