From 88a4b5c983409fd5d8a14c1e0e6aea0d3279d7dd Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Fri, 8 Mar 2019 14:01:47 -0800 Subject: [PATCH 1/2] Case 21642 - verification dialog when user hits return in goto search text entry+return should throw up verification dialog for first time to non-optimized domain --- interface/resources/qml/hifi/Feed.qml | 9 +++++++++ .../resources/qml/hifi/tablet/TabletAddressDialog.qml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/interface/resources/qml/hifi/Feed.qml b/interface/resources/qml/hifi/Feed.qml index 68aab2fdd2..7f48376dc7 100644 --- a/interface/resources/qml/hifi/Feed.qml +++ b/interface/resources/qml/hifi/Feed.qml @@ -189,4 +189,13 @@ Column { } } } + function isStandalone(address) { + + for (var i=0; i < suggestions.count; i++) { + if (suggestions.get(i).place_name.toLowerCase() === address.toLowerCase()) { + return suggestions.get(i).standalone_optimized; + } + } + return false; + } } diff --git a/interface/resources/qml/hifi/tablet/TabletAddressDialog.qml b/interface/resources/qml/hifi/tablet/TabletAddressDialog.qml index 311d20955b..4edae017d1 100644 --- a/interface/resources/qml/hifi/tablet/TabletAddressDialog.qml +++ b/interface/resources/qml/hifi/tablet/TabletAddressDialog.qml @@ -230,7 +230,7 @@ StackView { updateLocationText(text.length > 0); } onAccepted: { - toggleOrGo(); + toggleOrGo(addressLine.text, false, places.isStandalone(addressLine.text)); } // unfortunately TextField from Quick Controls 2 disallow customization of placeHolderText color without creation of new style From b3f5d76d0f078e49f988faf06f19e305e2c4ecd1 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Fri, 8 Mar 2019 14:37:15 -0800 Subject: [PATCH 2/2] CR Fix --- interface/resources/qml/hifi/Feed.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/hifi/Feed.qml b/interface/resources/qml/hifi/Feed.qml index 7f48376dc7..718ebc9331 100644 --- a/interface/resources/qml/hifi/Feed.qml +++ b/interface/resources/qml/hifi/Feed.qml @@ -190,9 +190,10 @@ Column { } } function isStandalone(address) { - + var lowerAddress = address.toLowerCase(); + for (var i=0; i < suggestions.count; i++) { - if (suggestions.get(i).place_name.toLowerCase() === address.toLowerCase()) { + if (suggestions.get(i).place_name.toLowerCase() === lowerAddress) { return suggestions.get(i).standalone_optimized; } }