Fixed photo totals on memories

Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
James Ketr 2018-09-13 11:34:56 -07:00
parent 77e8db079d
commit 6405290401

View File

@ -271,7 +271,7 @@
date="{{date}}"></calendar-element>
<div>Pick a date on the calendar to look back in time and see photos from that day.</div>
<div hidden$="[[!thumbnails.length]]">
<div><b>[[thumbnails.length]]</b> photos taken across <b>[[years.length]]</b> years.</div>
<div><b>[[add(thumbnails.length,pendingPhotos.length)]]</b> photos taken over <b>[[years.length]]</b> year(s).</div>
</div>
</div>
<div id="albums" class="flex layout vertical">
@ -376,6 +376,10 @@
"dateChanged(date)"
],
add: function(a, b) {
return parseInt(a) + parseInt(b);
},
isToday: function(date) {
return this.date == "2016-" + window.moment().format("MM-DD");
},
@ -403,6 +407,7 @@
this.years = [];
this.notifyPath("years.length");
this.pendingPhotos = [];
this.notifyPath("pendingPhotos.length");
this.visibleThumbs = [];
this.thumbnails = [];
this.notifyPath("thumbnails.length");
@ -744,7 +749,7 @@
}.bind(this));
this.pendingPhotos = this.pendingPhotos.concat(photos);
this.notifyPath("pendingPhotos.length");
this.async(this.processItems.bind(this));
console.log("Total pending: " + this.pendingPhotos.length);
@ -762,6 +767,7 @@
}
var photos = this.pendingPhotos.splice(0, 50);
this.notifyPath("pendingPhotos.length");
for (var i = 0; i < photos.length; i++) {
var photo = photos[i],