#include <utime.h>
#include <lib-lua/lib-lua.h>
-#include <lib-ui/curses.h>
-#include <lib-ui/sidebar.h>
+#include <lib-ui/lib-ui.h>
#include <lib-mx/mx.h>
#include <lib-mx/mh.h>
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)
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 */
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;
/* 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;
}
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) {
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)