             encodeURIComponent _getURISort()
 
         url = "mailbox/#{mailboxID}/?sort=#{sort}"
-        if filter.type is 'flag' and _isFilterEmpty 'value', filter
+        if filter.type is 'flag' and _isFilter filter.value
             url += "&flag=#{filter.value}"
 
-        if _isFilterEmpty 'before', filter
+        if _isFilter filter.before
             url += "&before=#{encodeURIComponent filter.before}"
 
-        if _isFilterEmpty 'after', filter
+        if _isFilter filter.after
             url += "&after=#{encodeURIComponent filter.after}"
         return url
 

                result[key] = value
        result

    _isFilterEmpty = (str, filter) ->
        if not filter or not _.isObject filter
            filter = _getFilter() or {}
        not (value = filter[str]) or value is '-'

    _getURISort = (filter) ->
        filter = _getFilter() unless filter

    #
    # return a {string}
    getQueryKey: (str = '') ->
        filter = _getFilter()
        filterize = (key) ->
            filter[key] if _isFilter filter[key]

        keys = _.compact ['before', 'after'].map filterize
        keys.unshift str unless _.isEmpty str
