                 filterAttach: false
 
         toggleFilterAttach = =>
-            filter = if @state.filterAttach then MessageFilter.ALL else MessageFilter.ATTACH
+            if @state.filterAttach
+                filter = MessageFilter.ALL
+            else
+                filter = MessageFilter.ATTACH
             LayoutActionCreator.filterMessages filter
             showList()
             @setState

DomUtils       = require '../utils/dom_utils'
MessageUtils   = require '../utils/message_utils'
SocketUtils    = require '../utils/socketio_utils'
{MessageFlags, MessageFilter, FlagsConstants} = require '../constants/app_constants'

AccountActionCreator      = require '../actions/account_action_creator'
ContactActionCreator      = require '../actions/contact_action_creator'

        @_onMount()

    _onMount: ->
        # If selected message has changed, scroll the list to put
        # current message into view
        if @state.messageID isnt @props.messageID
            active = document.querySelector("[data-message-id='#{@props.messageID}']")
            if active? and not DomUtils.isVisible(active)
