aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/notmuch-private.h
diff options
context:
space:
mode:
authorGravatar Jesse Rosenthal <jrosenthal@jhu.edu>2010-04-17 13:59:22 -0400
committerGravatar Carl Worth <cworth@cworth.org>2010-04-21 14:56:53 -0700
commit4971b85641def6b17072ae1b0de0adf15d197f2c (patch)
tree66a6100c1c0b31d2e908ba4fcc37127335206b55 /lib/notmuch-private.h
parent2186cac8e7bbc07c6aba0e1fbea91ca789814ecd (diff)
Name thread based on matching msgs instead of first msg.
At the moment all threads are named based on the name of the first message in the thread. However, this can cause problems if people either start new threads by replying-all (as unfortunately, many out there do) or change the subject of their mails to reflect a shift in a thread on a list. This patch names threads based on (a) matches for the query, and (b) the search order. If the search order is oldest-first (as in the default inbox) it chooses the oldest matching message as the subject. If the search order is newest-first it chooses the newest one. Reply prefixes ("Re: ", "Aw: ", "Sv: ", "Vs: ") are ignored (case-insensitively) so a Re: won't change the subject. Note that this adds a "sort" argument to _notmuch_thread_create and _thread_add_matched_message, so that when constructing the thread we can be aware of the sort order. Signed-off-by: Jesse Rosenthal <jrosenthal@jhu.edu>
Diffstat (limited to 'lib/notmuch-private.h')
-rw-r--r--lib/notmuch-private.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h
index d52d84d4..94cce1bc 100644
--- a/lib/notmuch-private.h
+++ b/lib/notmuch-private.h
@@ -205,7 +205,8 @@ notmuch_thread_t *
_notmuch_thread_create (void *ctx,
notmuch_database_t *notmuch,
const char *thread_id,
- const char *query_string);
+ const char *query_string,
+ notmuch_sort_t sort);
/* message.cc */