             @emit 'change'
 
         handle ActionTypes.QUERY_PARAMETER_CHANGED, (parameters) ->
-
-            # _messages  = _messages.clear()
-            # "sort/-date/flag/unseen/before/-/after/-"
-
-            {type, flag, sort, before, after} = parameters
-
-
-
-            if type isnt _filterType or _filterValue isnt flag or
-            _filterBefore isnt before or _filterAfter isnt after or
-            _sortOrder + _sortField isnt sort
-
-                _queryRef++
-                _sortOrder = sort.substr(0, 1)
-                _sortField = sort.substr(1)
-                _filterType = type
-                _filterValue = flag
-                _filterBefore = before
-                _filterAfter = after
-                _noMore = false
-                _nextUrl = null
-
-                if _filterType in ['from', 'dest'] or type in ['from', 'dest']
-                    # we cant properly filter messages by dest or from in the
-                    # client, instead we clear message cache and dont filter
-                    # on display
-                    _messages = _messages.clear()
-                    _conversationMemoize = null
+            return if _.isEmpty (params = _difference parameters, _getFilter())
+
+            filter = _setFilter params
+            if filter.type in ['from', 'dest']
+                # we cant properly filter messages by dest or from in the
+                # client, instead we clear message cache and dont filter
+                # on display
+                _messages = _messages.clear()
+                _conversationMemoize = null
 
             @emit 'change'
 

                return true

    _matchFlag = (message) ->
        switch _filterValue
            when MessageFilter.FLAGGED
                MessageFlags.FLAGGED in message.get('flags')
            when MessageFilter.ATTACH


        handle ActionTypes.SELECT_ACCOUNT, (value) ->
            @setCurrentID null
            _resetFilter()

        handle ActionTypes.RECEIVE_MESSAGE_DELETE, (id) ->
            _messages = _messages.remove id
