mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
fix typo and entry on first run when --url is set
This commit is contained in:
parent
8db3d03772
commit
42c1f4be33
3 changed files with 20 additions and 9 deletions
|
@ -3800,10 +3800,14 @@ void Application::handleSandboxStatus(QNetworkReply* reply) {
|
|||
|
||||
// If this is a first run we short-circuit the address passed in
|
||||
if (_firstRun.get()) {
|
||||
DependencyManager::get<AddressManager>()->goToEntry();
|
||||
sentTo = SENT_TO_ENTRY;
|
||||
_firstRun.set(false);
|
||||
|
||||
if (!_overrideEntry) {
|
||||
DependencyManager::get<AddressManager>()->goToEntry();
|
||||
sentTo = SENT_TO_ENTRY;
|
||||
} else {
|
||||
DependencyManager::get<AddressManager>()->loadSettings(addressLookupString);
|
||||
sentTo = SENT_TO_PREVIOUS_LOCATION;
|
||||
}
|
||||
_firstRun.set(false);
|
||||
} else {
|
||||
QString goingTo = "";
|
||||
if (addressLookupString.isEmpty()) {
|
||||
|
@ -3819,7 +3823,7 @@ void Application::handleSandboxStatus(QNetworkReply* reply) {
|
|||
DependencyManager::get<AddressManager>()->loadSettings(addressLookupString);
|
||||
sentTo = SENT_TO_PREVIOUS_LOCATION;
|
||||
}
|
||||
|
||||
|
||||
UserActivityLogger::getInstance().logAction("startup_sent_to", {
|
||||
{ "sent_to", sentTo },
|
||||
{ "sandbox_is_running", sandboxIsRunning },
|
||||
|
@ -9354,11 +9358,13 @@ void Application::showUrlHandler(const QUrl& url) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Application::overrideEntry(){
|
||||
_overrideEntry = true;
|
||||
}
|
||||
void Application::forceDisplayName(const QString& displayName) {
|
||||
getMyAvatar()->setDisplayName(displayName);
|
||||
}
|
||||
void Application::forceLogginWithTokens(const QString& tokens) {
|
||||
void Application::forceLoginWithTokens(const QString& tokens) {
|
||||
DependencyManager::get<AccountManager>()->setAccessTokens(tokens);
|
||||
}
|
||||
void Application::setConfigFileURL(const QString& fileUrl) {
|
||||
|
|
|
@ -356,8 +356,9 @@ public:
|
|||
|
||||
void openDirectory(const QString& path);
|
||||
|
||||
void overrideEntry();
|
||||
void forceDisplayName(const QString& displayName);
|
||||
void forceLogginWithTokens(const QString& tokens);
|
||||
void forceLoginWithTokens(const QString& tokens);
|
||||
void setConfigFileURL(const QString& fileUrl);
|
||||
|
||||
signals:
|
||||
|
@ -832,5 +833,6 @@ private:
|
|||
bool _resumeAfterLoginDialogActionTaken_WasPostponed { false };
|
||||
bool _resumeAfterLoginDialogActionTaken_SafeToRun { false };
|
||||
bool _startUpFinished { false };
|
||||
bool _overrideEntry { false };
|
||||
};
|
||||
#endif // hifi_Application_h
|
||||
|
|
|
@ -407,6 +407,9 @@ int main(int argc, const char* argv[]) {
|
|||
|
||||
auto appPointer = dynamic_cast<Application*>(&app);
|
||||
if (appPointer) {
|
||||
if (parser.isSet(urlOption)) {
|
||||
appPointer->overrideEntry();
|
||||
}
|
||||
if (parser.isSet(displayNameOption)) {
|
||||
QString displayName = QString(parser.value(displayNameOption));
|
||||
appPointer->forceDisplayName(displayName);
|
||||
|
@ -416,7 +419,7 @@ int main(int argc, const char* argv[]) {
|
|||
}
|
||||
if (parser.isSet(responseTokensOption)) {
|
||||
QString tokens = QString(parser.value(responseTokensOption));
|
||||
appPointer->forceLogginWithTokens(tokens);
|
||||
appPointer->forceLoginWithTokens(tokens);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue