summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorMonroe Williams <monroe@pobox.com>2010-09-30 12:18:49 -0700
committerMonroe Williams <monroe@pobox.com>2010-09-30 12:18:49 -0700
commitcd2b9b45faa6dfd7a4c4e72fbe5395de8ad8f98d (patch)
treef77b9e95047af39cbce672f0ead32bdac16250ea /indra/llui
parent900d23ffe1faad8dab66761de7f125a616b6156f (diff)
Cancel hidden notifications instead of using empty responses.
This is more work on EXP-111. Reviewed by Richard.
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llnotifications.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 98718e4de7..dd56f03237 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -196,6 +196,17 @@ bool emptyResponse(const LLSD& payload)
return false;
}
+bool cancelNotification(const LLSD& payload)
+{
+ if (payload["sigtype"].asString() == "add")
+ {
+ // cancel this notification
+ LLNotifications::instance().cancel(LLNotifications::instance().find(payload["id"].asUUID()));
+ }
+ return false;
+}
+
+
namespace LLNotificationFilters
{
// a sample filter
@@ -1252,7 +1263,7 @@ void LLNotifications::createDefaultChannels()
LLNotifications::instance().getChannel("Ignore")->
connectFailedFilter(&handleIgnoredNotification);
LLNotifications::instance().getChannel("VisibilityRules")->
- connectFailedFilter(&emptyResponse);
+ connectFailedFilter(&cancelNotification);
}
bool LLNotifications::addTemplate(const std::string &name,