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:
Ryan Huffman 2014-04-30 21:12:04 -07:00
parent a7dd19183e
commit 33ca387c86

View file

@ -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;
}