summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2021-05-13 17:51:24 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2021-05-13 17:51:24 +0300
commit9a1688322ab739f8838611d1b9e37d33adc07dfb (patch)
treeb8db75d626804619751d4e9d5e5b1f8c90298a99 /indra/llui
parentfde4bd2cbc62fef1d3290aa86cbef615ad097bf6 (diff)
SL-15195 The notification in chat history is multiplied after relogging
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llnotifications.cpp14
-rw-r--r--indra/llui/llnotifications.h6
2 files changed, 20 insertions, 0 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 06ec648178..c9e5c6653b 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -1699,6 +1699,20 @@ void LLNotifications::add(const LLNotificationPtr pNotif)
updateItem(LLSD().with("sigtype", "add").with("id", pNotif->id()), pNotif);
}
+void LLNotifications::load(const LLNotificationPtr pNotif)
+{
+ if (pNotif == NULL) return;
+
+ // first see if we already have it -- if so, that's a problem
+ LLNotificationSet::iterator it=mItems.find(pNotif);
+ if (it != mItems.end())
+ {
+ LL_ERRS() << "Notification loaded a second time to the master notification channel." << LL_ENDL;
+ }
+
+ updateItem(LLSD().with("sigtype", "load").with("id", pNotif->id()), pNotif);
+}
+
void LLNotifications::cancel(LLNotificationPtr pNotif)
{
if (pNotif == NULL || pNotif->isCancelled()) return;
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 2f4578da17..3ee48d1401 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -910,6 +910,7 @@ public:
LLNotificationPtr add(const LLNotification::Params& p);
void add(const LLNotificationPtr pNotif);
+ void load(const LLNotificationPtr pNotif);
void cancel(LLNotificationPtr pNotif);
void cancelByName(const std::string& name);
void cancelByOwner(const LLUUID ownerId);
@@ -1106,6 +1107,11 @@ private:
mHistory.push_back(p);
}
+ void onLoad(LLNotificationPtr p)
+ {
+ mHistory.push_back(p);
+ }
+
std::vector<LLNotificationPtr> mHistory;
};