From 18b9d02a09666e31fcb6d0858eb862521145c848 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Fri, 29 Oct 1999 05:43:19 +0000 Subject: [PATCH] Don't check the number of postponed messages every time the status line is updated - this gets quite slow when used with slow IMAP connections. --- buffy.c | 4 ++++ globals.h | 1 + postpone.c | 1 - send.c | 2 ++ status.c | 2 +- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/buffy.c b/buffy.c index ab9e870f..b7f722ef 100644 --- a/buffy.c +++ b/buffy.c @@ -380,6 +380,10 @@ int mutt_buffy_check (int force) BuffyNotify++; } + /* update postponed count as well, on force */ + if (force && Postponed) + mutt_num_postponed (); + BuffyDoneTime = BuffyTime; return (BuffyCount); } diff --git a/globals.h b/globals.h index 36ed6350..1de45f52 100644 --- a/globals.h +++ b/globals.h @@ -126,6 +126,7 @@ WHERE short HistSize; WHERE short PagerContext; WHERE short PagerIndexLines; WHERE short PopPort; +WHERE short PostCount INITVAL(0); WHERE short ReadInc; WHERE short SendmailWait; WHERE short Timeout; diff --git a/postpone.c b/postpone.c index 9577477c..a5aebf62 100644 --- a/postpone.c +++ b/postpone.c @@ -49,7 +49,6 @@ static struct mapping_t PostponeHelp[] = { -static short PostCount = 0; static time_t LastModify = 0; static CONTEXT *PostContext = NULL; diff --git a/send.c b/send.c index ed97deb7..2a0b6bb3 100644 --- a/send.c +++ b/send.c @@ -1205,6 +1205,8 @@ main_loop: goto main_loop; } mutt_message _("Message postponed."); + PostCount++; + mutt_num_postponed (); goto cleanup; } } diff --git a/status.c b/status.c index 1f11fb27..a53703de 100644 --- a/status.c +++ b/status.c @@ -176,7 +176,7 @@ status_format_str (char *buf, size_t buflen, char op, const char *src, break; case 'p': - count = mutt_num_postponed (); + count = PostCount; if (!optional) { snprintf (fmt, sizeof (fmt), "%%%sd", prefix); -- 2.40.0