summaryrefslogtreecommitdiff
path: root/indra/newview/llpersistentnotificationstorage.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-01-21 02:22:50 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-01-21 02:23:06 +0200
commit676ed67485d51150e89257f82e57b19bd55b9e8c (patch)
tree5e2ca785973aa7a480e877e4c35abd2969564478 /indra/newview/llpersistentnotificationstorage.cpp
parent993908c8b47aa865b07f7f58b6f85eb2e38efcbc (diff)
SL-12335 Viewer loaded notifications from wrong file
Diffstat (limited to 'indra/newview/llpersistentnotificationstorage.cpp')
-rw-r--r--indra/newview/llpersistentnotificationstorage.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp
index f95ab9928d..b6549800a2 100644
--- a/indra/newview/llpersistentnotificationstorage.cpp
+++ b/indra/newview/llpersistentnotificationstorage.cpp
@@ -167,12 +167,16 @@ void LLPersistentNotificationStorage::loadNotifications()
LL_INFOS("LLPersistentNotificationStorage") << "finished loading notifications" << LL_ENDL;
}
-void LLPersistentNotificationStorage::initialize()
+void LLPersistentNotificationStorage::reset()
{
- std::string file_name = "open_notifications_" + LLGridManager::getInstance()->getGrid() + ".xml";
- setFileName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, file_name));
- setOldFileName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "open_notifications.xml"));
+ std::string file_name = "open_notifications_" + LLGridManager::getInstance()->getGrid() + ".xml";
+ setFileName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, file_name));
+ setOldFileName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "open_notifications.xml"));
+}
+void LLPersistentNotificationStorage::initialize()
+{
+ reset();
LLNotifications::instance().getChannel("Persistent")->
connectChanged(boost::bind(&LLPersistentNotificationStorage::onPersistentChannelChanged, this, _1));
}