mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
query.cc: allow to return query results unsorted
Previously, we always sorted the returned results by some string value, (newest-to-oldest by default), however in some cases (as when applying tags to a search result) we are not interested in any special order. This introduces a NOTMUCH_SORT_UNSORTED value that does just that. It is not used at the moment anywhere in the code. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
f41a35e292
commit
aadb15a002
2 changed files with 4 additions and 1 deletions
|
@ -346,7 +346,8 @@ notmuch_query_create (notmuch_database_t *database,
|
|||
typedef enum {
|
||||
NOTMUCH_SORT_OLDEST_FIRST,
|
||||
NOTMUCH_SORT_NEWEST_FIRST,
|
||||
NOTMUCH_SORT_MESSAGE_ID
|
||||
NOTMUCH_SORT_MESSAGE_ID,
|
||||
NOTMUCH_SORT_UNSORTED
|
||||
} notmuch_sort_t;
|
||||
|
||||
/* Specify the sorting desired for this query. */
|
||||
|
|
|
@ -148,6 +148,8 @@ notmuch_query_search_messages (notmuch_query_t *query)
|
|||
case NOTMUCH_SORT_MESSAGE_ID:
|
||||
enquire.set_sort_by_value (NOTMUCH_VALUE_MESSAGE_ID, FALSE);
|
||||
break;
|
||||
case NOTMUCH_SORT_UNSORTED:
|
||||
break;
|
||||
}
|
||||
|
||||
#if DEBUG_QUERY
|
||||
|
|
Loading…
Reference in a new issue