From 17e64cf5e6e4cc46660590f2e50d5e09273fcf20 Mon Sep 17 00:00:00 2001 From: howard-stearns Date: Mon, 18 Jul 2016 16:58:29 -0700 Subject: [PATCH] suggest only unrestricted domains, and also use server to sort --- interface/resources/qml/AddressBarDialog.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/interface/resources/qml/AddressBarDialog.qml b/interface/resources/qml/AddressBarDialog.qml index f08ef5c608..b806bbbca2 100644 --- a/interface/resources/qml/AddressBarDialog.qml +++ b/interface/resources/qml/AddressBarDialog.qml @@ -245,8 +245,10 @@ Window { if (!options.page) { options.page = 1; } - // FIXME: really want places I'm allowed in, not just open ones - var url = "https://metaverse.highfidelity.com/api/v1/domains/all?open&active&page=" + options.page + "&users=" + options.minUsers + "-" + options.maxUsers; + // FIXME: really want places I'm allowed in, not just open ones. + // FIXME: If logged in, add hifi to the restriction options, in order to include places that require login. + // FIXME: add maturity + var url = "https://metaverse.highfidelity.com/api/v1/domains/all?open&active&restriction=open&sort_by=users&sort_order=desc&page=" + options.page + "&users=" + options.minUsers + "-" + options.maxUsers; getRequest(url, function (error, json) { if (!error && (json.status !== 'success')) { error = new Error("Bad response: " + JSON.stringify(json)); @@ -304,7 +306,6 @@ Window { } var here = AddressManager.hostname; // don't show where we are now. allDomains = domains.filter(function (domain) { return domain.name !== here; }); - allDomains.sort(function (a, b) { return b.online_users - a.online_users; }); // Whittle down suggestions to those that have at least one user, and try to get pictures. suggestionChoices = allDomains.filter(function (domain) { return domain.online_users; }); asyncEach(domains, addPictureToDomain, function (error) {