mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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);
|
||||
}
|
||||
} else if (urlParts.count() == 1) {
|
||||
// location coordinates or place name
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue