     getInitialState: ->
         return {
             edited: false
+            loading: false
         }
 
     componentWillReceiveProps: (props) ->
+        @setState loading: false
         if props.mailboxID isnt @props.mailboxID
             @setState edited: false
             @_selected = {}

        width  = window.innerWidth  or document.documentElement.clientWidth
        return rect.bottom <= ( height + 0 ) and rect.top >= 0

    _loadNext: =>
        if isVisible(@refs.nextPage.getDOMNode(), true)
            scrollable.removeEventListener 'scroll', loadNext
            LayoutActionCreator.showMessageList parameters: @props.query
            #@redirect @props.paginationUrl

    _initScroll: ->
        if not @refs.nextPage?

                    ul className: 'list-unstyled',
                        messages
                    if @props.messages.count() < nbMessages
                        p className: 'text-center',
                            if @state.loading
                                i className: "fa fa-refresh fa-spin"
                            else
                                a
                                    #href: @props.paginationUrl
                                    onClick: nextPage,
                                    ref: 'nextPage',
                                    t 'list next page'
                    else
                        p null, t 'list end'

