Fixed photo totals on memories
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
77e8db079d
commit
6405290401
@ -271,7 +271,7 @@
|
|||||||
date="{{date}}"></calendar-element>
|
date="{{date}}"></calendar-element>
|
||||||
<div>Pick a date on the calendar to look back in time and see photos from that day.</div>
|
<div>Pick a date on the calendar to look back in time and see photos from that day.</div>
|
||||||
<div hidden$="[[!thumbnails.length]]">
|
<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>
|
</div>
|
||||||
<div id="albums" class="flex layout vertical">
|
<div id="albums" class="flex layout vertical">
|
||||||
@ -376,6 +376,10 @@
|
|||||||
"dateChanged(date)"
|
"dateChanged(date)"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
add: function(a, b) {
|
||||||
|
return parseInt(a) + parseInt(b);
|
||||||
|
},
|
||||||
|
|
||||||
isToday: function(date) {
|
isToday: function(date) {
|
||||||
return this.date == "2016-" + window.moment().format("MM-DD");
|
return this.date == "2016-" + window.moment().format("MM-DD");
|
||||||
},
|
},
|
||||||
@ -403,6 +407,7 @@
|
|||||||
this.years = [];
|
this.years = [];
|
||||||
this.notifyPath("years.length");
|
this.notifyPath("years.length");
|
||||||
this.pendingPhotos = [];
|
this.pendingPhotos = [];
|
||||||
|
this.notifyPath("pendingPhotos.length");
|
||||||
this.visibleThumbs = [];
|
this.visibleThumbs = [];
|
||||||
this.thumbnails = [];
|
this.thumbnails = [];
|
||||||
this.notifyPath("thumbnails.length");
|
this.notifyPath("thumbnails.length");
|
||||||
@ -744,7 +749,7 @@
|
|||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
this.pendingPhotos = this.pendingPhotos.concat(photos);
|
this.pendingPhotos = this.pendingPhotos.concat(photos);
|
||||||
|
this.notifyPath("pendingPhotos.length");
|
||||||
this.async(this.processItems.bind(this));
|
this.async(this.processItems.bind(this));
|
||||||
|
|
||||||
console.log("Total pending: " + this.pendingPhotos.length);
|
console.log("Total pending: " + this.pendingPhotos.length);
|
||||||
@ -762,6 +767,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
var photos = this.pendingPhotos.splice(0, 50);
|
var photos = this.pendingPhotos.splice(0, 50);
|
||||||
|
this.notifyPath("pendingPhotos.length");
|
||||||
|
|
||||||
for (var i = 0; i < photos.length; i++) {
|
for (var i = 0; i < photos.length; i++) {
|
||||||
var photo = photos[i],
|
var photo = photos[i],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user