                 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

                event.preventDefault()
                MessageActionCreator.setCurrent node.dataset.messageId, true
                if @props.settings.get('displayPreview')
                    href = '#' + node.dataset.href.split('#')[1]
                    @redirect href

    onMessageDblClick: (event) ->

            LayoutActionCreator.showMessageList parameters: params

        toggleFilterFlag = =>
            if @state.filterFlag
                filter = MessageFilter.ALL
            else
                filter = MessageFilter.FLAGGED
            LayoutActionCreator.filterMessages filter
            showList()
            @setState
