summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationofferhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnotificationofferhandler.cpp')
-rw-r--r--indra/newview/llnotificationofferhandler.cpp33
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")