mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 01:43:27 +02:00
Merge pull request #8503 from howard-stearns/pr-review-comments-5
pr review
This commit is contained in:
commit
f53ce94b20
3 changed files with 12 additions and 8 deletions
|
@ -273,9 +273,9 @@ Window {
|
||||||
function asyncMap(array, iterator, cb) {
|
function asyncMap(array, iterator, cb) {
|
||||||
// call iterator(element, icb) once for each element of array, and then cb(error, mappedResult)
|
// call iterator(element, icb) once for each element of array, and then cb(error, mappedResult)
|
||||||
// when icb(error, mappedElement) has been called by each iterator.
|
// when icb(error, mappedElement) has been called by each iterator.
|
||||||
// Calls to iterator are overlapped and map call icb in any order, but the mappedResults are collected in the same
|
// Calls to iterator are overlapped and may call icb in any order, but the mappedResults are collected in the same
|
||||||
// order as the elements of the array.
|
// order as the elements of the array.
|
||||||
// short-circuits if error. Note that iterator MUST be an asynchronous function. (Use setTimeout if necessary.)
|
// Short-circuits if error. Note that iterator MUST be an asynchronous function. (Use setTimeout if necessary.)
|
||||||
var count = array.length, results = [];
|
var count = array.length, results = [];
|
||||||
if (!count) {
|
if (!count) {
|
||||||
return cb(null, results);
|
return cb(null, results);
|
||||||
|
@ -287,7 +287,7 @@ Window {
|
||||||
iterator(element, function (error, mapped) {
|
iterator(element, function (error, mapped) {
|
||||||
results[index] = mapped;
|
results[index] = mapped;
|
||||||
if (error || !--count) {
|
if (error || !--count) {
|
||||||
count = 1; // don't cb multiple times if error
|
count = 0; // don't cb multiple times if error
|
||||||
cb(error, results);
|
cb(error, results);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -397,9 +397,9 @@ Window {
|
||||||
// only appending the collected results.
|
// only appending the collected results.
|
||||||
var params = [
|
var params = [
|
||||||
'open', // published hours handle now
|
'open', // published hours handle now
|
||||||
// FIXME: should determine if place is actually running
|
// TBD: should determine if place is actually running?
|
||||||
'restriction=open', // Not by whitelist, etc. FIXME: If logged in, add hifi to the restriction options, in order to include places that require login.
|
'restriction=open', // Not by whitelist, etc. TBD: If logged in, add hifi to the restriction options, in order to include places that require login?
|
||||||
// FIXME add maturity
|
// TBD: add maturity?
|
||||||
'protocol=' + encodeURIComponent(AddressManager.protocolVersion()),
|
'protocol=' + encodeURIComponent(AddressManager.protocolVersion()),
|
||||||
'sort_by=users',
|
'sort_by=users',
|
||||||
'sort_order=desc',
|
'sort_order=desc',
|
||||||
|
|
|
@ -37,6 +37,7 @@ Rectangle {
|
||||||
property int textSizeSmall: 18;
|
property int textSizeSmall: 18;
|
||||||
property string defaultThumbnail: Qt.resolvedUrl("../../images/default-domain.gif");
|
property string defaultThumbnail: Qt.resolvedUrl("../../images/default-domain.gif");
|
||||||
HifiConstants { id: hifi }
|
HifiConstants { id: hifi }
|
||||||
|
|
||||||
function pastTime(timestamp) { // Answer a descriptive string
|
function pastTime(timestamp) { // Answer a descriptive string
|
||||||
timestamp = new Date(timestamp);
|
timestamp = new Date(timestamp);
|
||||||
var then = timestamp.getTime(),
|
var then = timestamp.getTime(),
|
||||||
|
@ -77,7 +78,7 @@ Rectangle {
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
onStatusChanged: {
|
onStatusChanged: {
|
||||||
if (status == Image.Error) {
|
if (status == Image.Error) {
|
||||||
console.log("source: " + source + ": failed to load " + hfiUrl);
|
console.log("source: " + source + ": failed to load " + hifiUrl);
|
||||||
source = defaultThumbnail;
|
source = defaultThumbnail;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -129,6 +130,9 @@ Rectangle {
|
||||||
margins: textPadding;
|
margins: textPadding;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// These two can be supplied to provide hover behavior.
|
||||||
|
// For example, AddressBarDialog provides functions that set the current list view item
|
||||||
|
// to that which is being hovered over.
|
||||||
property var hoverThunk: function () { };
|
property var hoverThunk: function () { };
|
||||||
property var unhoverThunk: function () { };
|
property var unhoverThunk: function () { };
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
// edit-style.css
|
// SnapshotReview.css
|
||||||
//
|
//
|
||||||
// Created by Howard Stearns for David Rowe 8/22/2016.
|
// Created by Howard Stearns for David Rowe 8/22/2016.
|
||||||
// Copyright 2016 High Fidelity, Inc.
|
// Copyright 2016 High Fidelity, Inc.
|
||||||
|
|
Loading…
Reference in a new issue