diff options
| author | pavelkproductengine <pavelkproductengine@lindenlab.com> | 2016-01-28 15:34:10 +0200 |
|---|---|---|
| committer | pavelkproductengine <pavelkproductengine@lindenlab.com> | 2016-01-28 15:34:10 +0200 |
| commit | cdc7229e11ecab9d38a97ddc71c31b0459dd85f6 (patch) | |
| tree | 4e78b8f8b573ea8fd43780fd7149e9d4854418b9 /indra/llui/llnotifications.cpp | |
| parent | 81ecf0c0f304aef72f8b558c732b5ed62acfb946 (diff) | |
| parent | 5a5c023e291990a463b1a91846ce82c70da8daab (diff) | |
Merge MAINT-5194 Visual Outfit Browser with Release
Diffstat (limited to 'indra/llui/llnotifications.cpp')
| -rwxr-xr-x | indra/llui/llnotifications.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 7e235997d8..77e7d375c8 100755 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1715,6 +1715,30 @@ void LLNotifications::cancelByName(const std::string& name) } } +void LLNotifications::cancelByOwner(const LLUUID ownerId) +{ + std::vector<LLNotificationPtr> notifs_to_cancel; + for (LLNotificationSet::iterator it = mItems.begin(), end_it = mItems.end(); + it != end_it; + ++it) + { + LLNotificationPtr pNotif = *it; + if (pNotif && pNotif->getPayload().get("owner_id").asUUID() == ownerId) + { + notifs_to_cancel.push_back(pNotif); + } + } + + for (std::vector<LLNotificationPtr>::iterator it = notifs_to_cancel.begin(), end_it = notifs_to_cancel.end(); + it != end_it; + ++it) + { + LLNotificationPtr pNotif = *it; + pNotif->cancel(); + updateItem(LLSD().with("sigtype", "delete").with("id", pNotif->id()), pNotif); + } +} + void LLNotifications::update(const LLNotificationPtr pNotif) { LLNotificationSet::iterator it=mItems.find(pNotif); |
