Look at new in addition to msg_unread count, to account for when
$mail_check_stats is unset or when the sidebar only shows the %n
status flag.
b = Incoming;
if (!b || (b == HilBuffy))
break;
- if (b->msg_unread > 0)
+ if (b->new || b->msg_unread > 0)
return b;
} while (b);
b = Outgoing;
if (!b || (b == HilBuffy))
break;
- if (b->msg_unread > 0)
+ if (b->new || b->msg_unread > 0)
return b;
} while (b);
if (!new_only)
continue;
- if ((b == OpnBuffy) || (b->msg_unread > 0) ||
+ if ((b == OpnBuffy) || (b->msg_unread > 0) || b->new ||
(b == HilBuffy) || (b->msg_flagged > 0))
continue;