   @reviewFilter.set(null)
   @selectedSourceId = new ReactiveVar(null)
   @query = new ReactiveVar(null)
+  @sorting = new ReactiveVar(null)
   @currentPaneInView = new ReactiveVar('')
   @latestSourceDate = new ReactiveVar(null)
   @filtering = new ReactiveVar(false)

    dateQuery =
      $gte: new Date(startDate)
      $lte: new Date(endDate)
    sort = sort: publishDate: -1
    if query.addedByUserId
      sort = sort: addedDate: -1
      query.addedDate = dateQuery
    else
      query.publishDate = dateQuery

    @query.set(query)

    Meteor.call 'fetchPromedPosts', 100, range, (err) ->

    if calendar
      updateCalendarSelection(calendar, range)

    @subscribe "articles", query, =>
      unReviewedQuery = $and: [ {reviewed: false}, query ]
      firstSource = Articles.findOne(unReviewedQuery, sorting)
      if firstSource
        @selectedSourceId.set(firstSource._id)
      @filtering.set(false)
      if not @latestSourceDate.get()
        @latestSourceDate.set Articles.findOne({}, sorting)?.publishDate
      @ready.set(true)

Template.curatorInbox.onDestroyed ->
