mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-10 18:58:39 +02:00
Update goToURL to work with domains and user/location
If the path starts with # or @ it's a location or user, respectively, otherwise it is a domain.
This commit is contained in:
parent
a7dd19183e
commit
33ca387c86
1 changed files with 7 additions and 2 deletions
|
@ -931,9 +931,14 @@ bool Menu::goToURL(QString location) {
|
||||||
goToOrientation(orientation);
|
goToOrientation(orientation);
|
||||||
}
|
}
|
||||||
} else if (urlParts.count() == 1) {
|
} else if (urlParts.count() == 1) {
|
||||||
// location coordinates or place name
|
|
||||||
QString destination = urlParts[0];
|
QString destination = urlParts[0];
|
||||||
goTo(destination);
|
|
||||||
|
// If this starts with # or @, treat it as a user/location, otherwise treat it as a domain
|
||||||
|
if (destination[0] == '#' || destination[0] == '@') {
|
||||||
|
goTo(destination);
|
||||||
|
} else {
|
||||||
|
goToDomain(destination);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue