pr review

This commit is contained in:
howard-stearns 2016-08-22 16:09:09 -07:00
parent bfb7d728ad
commit bc90b0bc43
3 changed files with 12 additions and 8 deletions

View file

@ -273,9 +273,9 @@ Window {
function asyncMap(array, iterator, cb) {
// 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.
// 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.
// 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 = [];
if (!count) {
return cb(null, results);
@ -287,7 +287,7 @@ Window {
iterator(element, function (error, mapped) {
results[index] = mapped;
if (error || !--count) {
count = 1; // don't cb multiple times if error
count = 0; // don't cb multiple times if error
cb(error, results);
}
});
@ -397,9 +397,9 @@ Window {
// only appending the collected results.
var params = [
'open', // published hours handle now
// FIXME: 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.
// FIXME add maturity
// TBD: should determine if place is actually running?
'restriction=open', // Not by whitelist, etc. TBD: If logged in, add hifi to the restriction options, in order to include places that require login?
// TBD: add maturity?
'protocol=' + encodeURIComponent(AddressManager.protocolVersion()),
'sort_by=users',
'sort_order=desc',

View file

@ -37,6 +37,7 @@ Rectangle {
property int textSizeSmall: 18;
property string defaultThumbnail: Qt.resolvedUrl("../../images/default-domain.gif");
HifiConstants { id: hifi }
function pastTime(timestamp) { // Answer a descriptive string
timestamp = new Date(timestamp);
var then = timestamp.getTime(),
@ -77,7 +78,7 @@ Rectangle {
anchors.left: parent.left;
onStatusChanged: {
if (status == Image.Error) {
console.log("source: " + source + ": failed to load " + hfiUrl);
console.log("source: " + source + ": failed to load " + hifiUrl);
source = defaultThumbnail;
}
}
@ -129,6 +130,9 @@ Rectangle {
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 unhoverThunk: function () { };
MouseArea {

View file

@ -1,5 +1,5 @@
/*
// edit-style.css
// SnapshotReview.css
//
// Created by Howard Stearns for David Rowe 8/22/2016.
// Copyright 2016 High Fidelity, Inc.