lib/assets/javascripts/googleplus.photoreader.js.coffee in googleplus-reader-0.0.5 vs lib/assets/javascripts/googleplus.photoreader.js.coffee in googleplus-reader-0.0.6

- old
+ new

@@ -3,11 +3,13 @@ @define = (name, deps, callback) -> module.PhotoReader = callback(module.Reader, module.Photo) define 'googleplus.photoreader', ['googleplus.reader', 'googleplus.photo'], (Reader, Photo) -> class extends Reader - append: (items) -> + process: (items) -> + collection = [] + for item in items continue unless item.verb? continue unless item.verb is 'post' date = if item.published? then new Date(item.published) else null @@ -23,27 +25,27 @@ if attachment.objectType is 'photo' continue unless attachment.image? if attachment.fullImage? - @collection.push new Photo + collection.push new Photo url: attachment.image.url, width: attachment.fullImage.width, date: date else - @collection.push new Photo + collection.push new Photo url: attachment.image.url, width: null, date: date else if attachment.objectType is 'album' continue unless attachment.thumbnails? for thumbnail in attachment.thumbnails continue unless thumbnail.image? - @collection.push new Photo + collection.push new Photo url: thumbnail.image.url, width: null, date: date - return + collection