diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2009-12-07 15:15:41 +0200 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2009-12-07 15:15:41 +0200 |
commit | 0a617f15a83262ab472ca88f146c57bb0f6a6a73 (patch) | |
tree | 849d190131693d9ea976c0ce25501801d03ce5cb /indra/newview/llnotificationofferhandler.cpp | |
parent | 67ff38b51b59766ff7bc0af1e541b54ac067ea70 (diff) |
implemented EXT-2797 “Making friendship offer should be recorded into IM history”
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llnotificationofferhandler.cpp')
-rw-r--r-- | indra/newview/llnotificationofferhandler.cpp | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index b7f95ae2fa..4d64c5c0e4 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -41,6 +41,7 @@ #include "llnotifications.h" #include "llscriptfloater.h" #include "llimview.h" +#include "llnotificationsutil.h" using namespace LLNotificationsUI; @@ -122,20 +123,28 @@ bool LLOfferHandler::processNotification(const LLSD& notify) } } - LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); + if (notification->getPayload().has("SUPPRES_TOST") + && notification->getPayload()["SUPPRES_TOST"]) + { + LLNotificationsUtil::cancel(notification); + } + else + { + LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); - LLToast::Params p; - p.notif_id = notification->getID(); - p.notification = notification; - p.panel = notify_box; - p.on_delete_toast = boost::bind(&LLOfferHandler::onDeleteToast, this, _1); - - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); - if(channel) - channel->addToast(p); + LLToast::Params p; + p.notif_id = notification->getID(); + p.notification = notification; + p.panel = notify_box; + p.on_delete_toast = boost::bind(&LLOfferHandler::onDeleteToast, this, _1); - // send a signal to the counter manager - mNewNotificationSignal(); + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); + if(channel) + channel->addToast(p); + + // send a signal to the counter manager + mNewNotificationSignal(); + } } } else if (notify["sigtype"].asString() == "delete") |