summaryrefslogtreecommitdiff
path: root/indra/newview/llchannelmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llchannelmanager.cpp')
-rw-r--r--indra/newview/llchannelmanager.cpp45
1 files changed, 25 insertions, 20 deletions
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index 769387c26c..4f9434030f 100644
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -35,6 +35,7 @@
#include "llchannelmanager.h"
#include "llappviewer.h"
+#include "llnotificationstorage.h"
#include "llviewercontrol.h"
#include "llviewerwindow.h"
#include "llrootview.h"
@@ -107,31 +108,35 @@ void LLChannelManager::onLoginCompleted()
if(!away_notifications)
{
onStartUpToastClose();
- return;
}
-
- // create a channel for the StartUp Toast
- LLChannelManager::Params p;
- p.id = LLUUID(gSavedSettings.getString("StartUpChannelUUID"));
- p.channel_align = CA_RIGHT;
- mStartUpChannel = createChannel(p);
-
- if(!mStartUpChannel)
+ else
{
- onStartUpToastClose();
- return;
- }
+ // create a channel for the StartUp Toast
+ LLChannelManager::Params p;
+ p.id = LLUUID(gSavedSettings.getString("StartUpChannelUUID"));
+ p.channel_align = CA_RIGHT;
+ mStartUpChannel = createChannel(p);
- gViewerWindow->getRootView()->addChild(mStartUpChannel);
+ if(!mStartUpChannel)
+ {
+ onStartUpToastClose();
+ }
+ else
+ {
+ gViewerWindow->getRootView()->addChild(mStartUpChannel);
- // init channel's position and size
- S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
- S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
- mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound);
- mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4));
+ // init channel's position and size
+ S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
+ S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
+ mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound);
+ mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4));
+
+ mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this));
+ mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime"));
+ }
+ }
- mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this));
- mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime"));
+ LLPersistentNotificationStorage::getInstance()->loadNotifications();
}
//--------------------------------------------------------------------------