From 33ca387c8678e44874b4665594300b73fa7cc21c Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 30 Apr 2014 21:12:04 -0700 Subject: [PATCH] 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. --- interface/src/Menu.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 5c396f169c..7ab2639065 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -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; }