summaryrefslogtreecommitdiff
path: root/indra/newview/llpersistentnotificationstorage.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2013-10-25 11:48:43 -0700
committerGraham Linden <graham@lindenlab.com>2013-10-25 11:48:43 -0700
commit970ee73e9a9cd1c94c295c9decb4d632886c19e6 (patch)
tree18cc7f08bbc043252bea9a6f687807116585d286 /indra/newview/llpersistentnotificationstorage.cpp
parentd4e622daf2775147c75a75389ffb9b55f8cef799 (diff)
Fix release merge issues (included upstream changes not yet in release from bear)
Diffstat (limited to 'indra/newview/llpersistentnotificationstorage.cpp')
-rwxr-xr-xindra/newview/llpersistentnotificationstorage.cpp25
1 files changed, 5 insertions, 20 deletions
diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp
index d8fc2bee32..076c3e0235 100755
--- a/indra/newview/llpersistentnotificationstorage.cpp
+++ b/indra/newview/llpersistentnotificationstorage.cpp
@@ -77,14 +77,6 @@ void LLPersistentNotificationStorage::saveNotifications()
}
data.append(notification->asLLSD(true));
- if (data.size() >= gSavedSettings.getS32("MaxPersistentNotifications"))
- {
- llwarns << "Too many persistent notifications."
- << " Saved " << gSavedSettings.getS32("MaxPersistentNotifications") << " of " << history_channel->size()
- << " persistent notifications." << llendl;
- break;
- }
-
}
writeNotifications(output);
@@ -105,6 +97,7 @@ void LLPersistentNotificationStorage::loadNotifications()
}
mLoaded = true;
+
LLSD input;
if (!readNotifications(input) ||input.isUndefined())
{
@@ -122,9 +115,9 @@ void LLPersistentNotificationStorage::loadNotifications()
findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
LLNotifications& instance = LLNotifications::instance();
- S32 processed_notifications = 0;
- for (LLSD::reverse_array_iterator notification_it = data.rbeginArray();
- notification_it != data.rendArray();
+
+ for (LLSD::array_const_iterator notification_it = data.beginArray();
+ notification_it != data.endArray();
++notification_it)
{
LLSD notification_params = *notification_it;
@@ -143,16 +136,8 @@ void LLPersistentNotificationStorage::loadNotifications()
// hide saved toasts so they don't confuse the user
notification_channel->hideToast(notification->getID());
}
- ++processed_notifications;
- if (processed_notifications >= gSavedSettings.getS32("MaxPersistentNotifications"))
- {
- llwarns << "Too many persistent notifications."
- << " Processed " << gSavedSettings.getS32("MaxPersistentNotifications") << " of " << data.size() << " persistent notifications." << llendl;
- break;
- }
}
- LLNotifications::instance().getChannel("Persistent")->
- connectChanged(boost::bind(&LLPersistentNotificationStorage::onPersistentChannelChanged, this, _1));
+
LL_INFOS("LLPersistentNotificationStorage") << "finished loading notifications" << LL_ENDL;
}