summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-02-03 15:18:34 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-02-03 15:18:34 +0200
commite0727702ea00c975361cf94b4d2903a9fec6f6f8 (patch)
treed64f1cf4ebf58a08fb7fc197206ce31fab2aa115 /indra/newview/llstartup.cpp
parentc5195905b8c9b30a2b3aab652aa9828e9825c42f (diff)
parente58b5263598368b6dec4a836c72c69b50d701911 (diff)
Merge branch 'DRTVWR-501' into trunk
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp42
1 files changed, 27 insertions, 15 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 150777a778..38c201d340 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -904,8 +904,13 @@ bool idle_startup()
LLFile::mkdir(gDirUtilp->getLindenUserDir());
// As soon as directories are ready initialize notification storages
- LLPersistentNotificationStorage::getInstance()->initialize();
- LLDoNotDisturbNotificationStorage::getInstance()->initialize();
+ if (!LLPersistentNotificationStorage::instanceExists())
+ {
+ // check existance since this part of code can be reached
+ // twice due to login failures
+ LLPersistentNotificationStorage::initParamSingleton();
+ LLDoNotDisturbNotificationStorage::initParamSingleton();
+ }
// Set PerAccountSettingsFile to the default value.
gSavedSettings.setString("PerAccountSettingsFile",
@@ -1240,8 +1245,6 @@ bool idle_startup()
LLSurface::initClasses();
display_startup();
-
- LLFace::initClass();
display_startup();
LLDrawable::initClass();
@@ -1303,9 +1306,13 @@ bool idle_startup()
LLStartUp::initExperiences();
display_startup();
+
+ // If logging should be enebled, turns it on and loads history from disk
+ // Note: does not happen on init of singleton because preferences can use
+ // this instance without logging in
+ LLConversationLog::getInstance()->initLoggingState();
+
LLStartUp::setStartupState( STATE_MULTIMEDIA_INIT );
-
- LLConversationLog::getInstance();
return FALSE;
}
@@ -2709,6 +2716,15 @@ std::string& LLStartUp::getInitialOutfitName()
return sInitialOutfit;
}
+std::string LLStartUp::getUserId()
+{
+ if (gUserCredential.isNull())
+ {
+ return "";
+ }
+ return gUserCredential->userID();
+}
+
// Loads a bitmap to display during load
void init_start_screen(S32 location_id)
{
@@ -2879,9 +2895,6 @@ void LLStartUp::multimediaInit()
std::string msg = LLTrans::getString("LoginInitializingMultimedia");
set_startup_status(0.42f, msg.c_str(), gAgent.mMOTD.c_str());
display_startup();
-
- // LLViewerMedia::initClass();
- LLViewerParcelMedia::initClass();
}
void LLStartUp::fontInit()
@@ -2909,9 +2922,10 @@ void LLStartUp::initNameCache()
// Start cache in not-running state until we figure out if we have
// capabilities for display name lookup
- LLAvatarNameCache::initClass(false,gSavedSettings.getBOOL("UsePeopleAPI"));
- LLAvatarNameCache::setUseDisplayNames(gSavedSettings.getBOOL("UseDisplayNames"));
- LLAvatarNameCache::setUseUsernames(gSavedSettings.getBOOL("NameTagShowUsernames"));
+ LLAvatarNameCache* cache_inst = LLAvatarNameCache::getInstance();
+ cache_inst->setUsePeopleAPI(gSavedSettings.getBOOL("UsePeopleAPI"));
+ cache_inst->setUseDisplayNames(gSavedSettings.getBOOL("UseDisplayNames"));
+ cache_inst->setUseUsernames(gSavedSettings.getBOOL("NameTagShowUsernames"));
}
@@ -2926,8 +2940,6 @@ void LLStartUp::initExperiences()
void LLStartUp::cleanupNameCache()
{
- SUBSYSTEM_CLEANUP(LLAvatarNameCache);
-
delete gCacheName;
gCacheName = NULL;
}
@@ -3616,7 +3628,7 @@ bool process_login_success_response()
if(!openid_url.empty())
{
std::string openid_token = response["openid_token"];
- LLViewerMedia::openIDSetup(openid_url, openid_token);
+ LLViewerMedia::getInstance()->openIDSetup(openid_url, openid_token);
}
gMaxAgentGroups = DEFAULT_MAX_AGENT_GROUPS;