           find:
             discussionId: @discussion.id
           simplesort: 'positionKey'
-          limit: padding
         remote:
           discussion_id: @discussion.id
           position_key_sw: event.positionKey

import EventBus         from '@/shared/services/event_bus'
import Session from '@/shared/services/session'

padding = 25

export default class ThreadLoader
  constructor: (discussion) ->

            $jgt: event.positionKey
            $regex: (positionKeyPrefix && "^#{positionKeyPrefix}") || undefined
        simplesort: 'positionKey'
        limit: @padding
      remote:
        discussion_id: @discussion.id
        position_key_gt: event.positionKey
        position_key_sw: positionKeyPrefix || null
        order_by: 'position_key'
        per: @padding

  loadBefore: (event) ->
    @loading = event.id
