From 857abc5a1dd7dbccfa6782820e2b36c3008b91f2 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Tue, 16 Jul 2019 18:00:17 +0100 Subject: [PATCH] drop unused maildir_update_tables() --- maildir/maildir_private.h | 1 - maildir/shared.c | 34 ---------------------------------- 2 files changed, 35 deletions(-) diff --git a/maildir/maildir_private.h b/maildir/maildir_private.h index dae1933fd..388e0b30f 100644 --- a/maildir/maildir_private.h +++ b/maildir/maildir_private.h @@ -98,7 +98,6 @@ int maildir_move_to_mailbox(struct Mailbox *m, struct Maildi int maildir_parse_dir (struct Mailbox *m, struct Maildir ***last, const char *subdir, int *count, struct Progress *progress); void maildir_parse_flags (struct Email *e, const char *path); struct Email * maildir_parse_message (enum MailboxType magic, const char *fname, bool is_old, struct Email *e); -void maildir_update_tables (struct Context *ctx, int *index_hint); int md_commit_message (struct Mailbox *m, struct Message *msg, struct Email *e); int mh_commit_msg (struct Mailbox *m, struct Message *msg, struct Email *e, bool updseq); int mh_mkstemp (struct Mailbox *m, FILE **fp, char **tgt); diff --git a/maildir/shared.c b/maildir/shared.c index 196509ea1..5a58f6478 100644 --- a/maildir/shared.c +++ b/maildir/shared.c @@ -1179,40 +1179,6 @@ void maildir_canon_filename(struct Buffer *dest, const char *src) } } -/** - * maildir_update_tables - Update the Email tables - * @param ctx Mailbox - * @param index_hint Current Email in index - */ -void maildir_update_tables(struct Context *ctx, int *index_hint) -{ - if (!ctx || !ctx->mailbox) - return; - - struct Mailbox *m = ctx->mailbox; - - if (C_Sort != SORT_ORDER) - { - const enum SortType old_sort = C_Sort; - C_Sort = SORT_ORDER; - mutt_sort_headers(ctx, true); - C_Sort = old_sort; - } - - const int old_count = m->msg_count; - for (int i = 0, j = 0; i < old_count; i++) - { - if (m->emails[i]->active && index_hint && (*index_hint == i)) - *index_hint = j; - - if (m->emails[i]->active) - m->emails[i]->index = j++; - } - - ctx_update_tables(ctx, false); - mutt_clear_threads(ctx); -} - /** * md_open_find_message - Find a message in a maildir folder * @param[in] folder Base folder -- 2.40.0