From f72b01c02f4125e767f03e6b2875d3b1ccff4b5f Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Thu, 22 Nov 2018 12:28:22 +0000 Subject: [PATCH] factor out Context from link_threads() --- mutt_thread.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mutt_thread.c b/mutt_thread.c index 13c017bb7..bb3feb3c3 100644 --- a/mutt_thread.c +++ b/mutt_thread.c @@ -1448,17 +1448,17 @@ struct Hash *mutt_make_id_hash(struct Mailbox *m) * link_threads - Forcibly link messages together * @param parent Header of parent message * @param child Header of child message - * @param ctx Mailbox + * @param m Mailbox * @retval true On success */ -static bool link_threads(struct Email *parent, struct Email *child, struct Context *ctx) +static bool link_threads(struct Email *parent, struct Email *child, struct Mailbox *m) { if (child == parent) return false; mutt_break_thread(child); mutt_list_insert_head(&child->env->in_reply_to, mutt_str_strdup(parent->env->message_id)); - mutt_set_flag(ctx->mailbox, child, MUTT_TAG, 0); + mutt_set_flag(m, child, MUTT_TAG, 0); child->env->irt_changed = true; child->changed = true; @@ -1487,10 +1487,10 @@ bool mutt_link_threads(struct Email *cur, struct Email *last, struct Context *ct { for (int i = 0; i < m->msg_count; i++) if (message_is_tagged(ctx, i)) - changed |= link_threads(cur, m->hdrs[i], ctx); + changed |= link_threads(cur, m->hdrs[i], ctx->mailbox); } else - changed = link_threads(cur, last, ctx); + changed = link_threads(cur, last, ctx->mailbox); return changed; } -- 2.40.0