X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=buffy.cpkg;h=b516fe7ff506c00633a8303e1eec86f3f03facbb;hp=078c2f57225ebeaf143e73b197b1fb3df4eb252e;hb=16be8d10413bbcf822577afd4019d65aba7459e0;hpb=f435868132e200bfa71ac155f037cf64bf5414ba diff --git a/buffy.cpkg b/buffy.cpkg index 078c2f5..b516fe7 100644 --- a/buffy.cpkg +++ b/buffy.cpkg @@ -16,7 +16,6 @@ #include #include -#include #include #include @@ -121,7 +120,7 @@ int buffy_check(int force) struct stat contex_sb; time_t now, last1, last2; CONTEXT *ctx; - int i = 0, local = 0, count = 0; + int i = 0, local = 0; /* update postponed count as well, on force */ if (force == 1) @@ -145,8 +144,6 @@ int buffy_check(int force) BuffyCount = 0; BuffyNotify = 0; - count = sidebar_need_count(); - if (!Context || !Context->path || (mx_is_local (Context->magic-1) && stat (Context->path, &contex_sb) != 0)) { /* check device ID and serial number instead of comparing paths */ @@ -175,7 +172,7 @@ int buffy_check(int force) case M_MBOX: /* only check on force or $mail_check reached */ if (force == 1 || (now - last1 >= mod_buffy.mail_check)) { - if (!count) { + if (!sidebar_w) { if (STAT_CHECK) { BuffyCount++; tmp->new = 1; @@ -221,7 +218,7 @@ int buffy_check(int force) /* one new and undeleted message is enough */ if (tmp->new == 0) { BuffyCount++; - if (!count) { + if (!sidebar_w) { /* if sidebar invisible -> done */ tmp->new = 1; break; @@ -234,7 +231,7 @@ int buffy_check(int force) } closedir (dirp); - if (count) { + if (sidebar_w) { /* only count total mail if sidebar visible */ snprintf (path, sizeof (path), "%s/cur", tmp->path); if ((dirp = opendir (path)) == NULL) { @@ -266,7 +263,7 @@ int buffy_check(int force) if (force == 1 || (now - last1 >= mod_buffy.mail_check)) { if ((tmp->new = mh_buffy (tmp->path)) > 0) BuffyCount++; - if (count) { + if (sidebar_w) { DIR *dp; if ((dp = opendir (path)) == NULL)