lib: add last_child flag to thread information

With that flag it's possible to reconstruct the entire thread tree
structure in mu4e.
This commit is contained in:
Marcelo Henrique Cerri
2018-04-22 02:18:57 -03:00
parent b4cc67d455
commit 297120dc6c
3 changed files with 13 additions and 6 deletions

View File

@ -434,11 +434,13 @@ static void
append_sexp_thread_info (GString *gstr, const MuMsgIterThreadInfo *ti)
{
g_string_append_printf
(gstr, "\t:thread (:path \"%s\" :level %u%s%s%s%s)\n",
(gstr, "\t:thread (:path \"%s\" :level %u%s%s%s%s%s)\n",
ti->threadpath,
ti->level,
ti->prop & MU_MSG_ITER_THREAD_PROP_FIRST_CHILD ?
" :first-child t" : "",
ti->prop & MU_MSG_ITER_THREAD_PROP_LAST_CHILD ?
" :last-child t" : "",
ti->prop & MU_MSG_ITER_THREAD_PROP_EMPTY_PARENT ?
" :empty-parent t" : "",
ti->prop & MU_MSG_ITER_THREAD_PROP_DUP ?