 _ = require 'underscore'
 qs = require 'querystring'
 Backbone = require 'backbone'
+Q = require 'q'
+{ API_URL } = require('sharify').data
 Notifications = require '../../../collections/notifications.coffee'
 Artworks = require '../../../collections/artworks.coffee'
 Artist = require '../../../models/artist.coffee'


  checkIfEmpty: =>
    if @isEmpty()
      @fillBacklogArtists =>
        @filterState.set(empty:true) if @isEmpty()

  fillBacklogArtists: (cb) =>
    cb()

  attachScrollHandler: ->
    @$feed.waypoint (direction) =>

module.exports = class RecentlyAddedWorksView extends Backbone.View
  columnViews: []

  initialize: ({@notifications, @filterState, @following}) ->

    @$feed = @$('#notifications-feed')
    @$pins = @$('#notifications-pins')

    @backfilledArtworks = new Backbone.Collection []
    @listenTo @notifications, 'sync', @appendArtworks
    @filterState.on 'change', @render

