summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a5e9c06)
We were properly sorting the threads based only on matched messages,
but we were displaying the date based on the total messages in the
thread, which led to inconsistent and very confusing results.
g_hash_table_insert (thread->tags, xstrdup (tag), NULL);
}
g_hash_table_insert (thread->tags, xstrdup (tag), NULL);
}
+ thread->total_messages++;
+}
+
+static void
+_thread_add_matched_message (notmuch_thread_t *thread,
+ notmuch_message_t *message)
+{
+ time_t date;
+
date = notmuch_message_get_date (message);
date = notmuch_message_get_date (message);
- if (date < thread->oldest || ! thread->total_messages)
+ if (date < thread->oldest || ! thread->matched_messages)
- if (date > thread->newest || ! thread->total_messages)
+ if (date > thread->newest || ! thread->matched_messages)
- thread->total_messages++;
+ thread->matched_messages++;
}
/* Create a new notmuch_thread_t object for the given thread ID,
}
/* Create a new notmuch_thread_t object for the given thread ID,
notmuch_messages_has_more (messages);
notmuch_messages_advance (messages))
{
notmuch_messages_has_more (messages);
notmuch_messages_advance (messages))
{
- thread->matched_messages++;
+ _thread_add_matched_message (thread, notmuch_messages_get (messages));
}
notmuch_query_destroy (matched_query);
}
notmuch_query_destroy (matched_query);