if (mh_mailbox(m, check_stats))
MailboxCount++;
break;
-#ifdef USE_NOTMUCH
- case MUTT_NOTMUCH:
- m->msg_count = 0;
- m->msg_unread = 0;
- m->msg_flagged = 0;
- nm_nonctx_get_count(m);
- if (m->msg_unread > 0)
- {
- MailboxCount++;
- m->has_new = true;
- }
- break;
-#endif
case MUTT_IMAP:
if (!m->has_new)
break;
/* fallthrough */
case MUTT_MBOX:
case MUTT_MMDF:
+ case MUTT_NOTMUCH:
if (mx_mbox_check_stats(m, 0))
MailboxCount++;
break;
}
/**
- * nm_nonctx_get_count - Perform some queries without an open database
- * @param m Mailbox to examine
- * @retval 0 Success
- * @retval -1 Failure
+ * nm_mbox_check_stats - Implements MxOps::check_stats()
*/
-int nm_nonctx_get_count(struct Mailbox *m)
+static int nm_mbox_check_stats(struct Mailbox *m, int flags)
{
struct UrlQueryString *item = NULL;
struct Url *url = NULL;
.mbox_open = nm_mbox_open,
.mbox_open_append = NULL,
.mbox_check = nm_mbox_check,
+ .mbox_check_stats = nm_mbox_check_stats,
.mbox_sync = nm_mbox_sync,
.mbox_close = nm_mbox_close,
.msg_open = nm_msg_open,
void nm_db_longrun_done (struct Mailbox *m);
void nm_db_longrun_init (struct Mailbox *m, bool writable);
bool nm_message_is_still_queried(struct Mailbox *m, struct Email *e);
-int nm_nonctx_get_count (struct Mailbox *m);
void nm_parse_type_from_query (struct NmMboxData *mdata, char *buf);
int nm_path_probe (const char *path, const struct stat *st);
void nm_query_window_backward (void);