If another session wasn't dropping the \Recent flags, no new mails were
getting them unless the mailbox was reopened.
struct mail_cache_field *cache_fields;
ARRAY_TYPE(seq_range) recent_flags;
- uint32_t recent_flags_prev_uid;
+ uint32_t recent_flags_prev_uid, recent_flags_last_check_nextuid;
uint32_t recent_flags_count;
uint32_t vsize_hdr_ext_id;
uint32_t seq1, seq2;
hdr = mail_index_get_header(box->view);
- if (hdr->first_recent_uid > ibox->recent_flags_prev_uid) {
+ if (hdr->first_recent_uid > ibox->recent_flags_prev_uid ||
+ hdr->next_uid > ibox->recent_flags_last_check_nextuid) {
+ ibox->recent_flags_last_check_nextuid = hdr->next_uid;
mail_index_lookup_seq_range(box->view,
hdr->first_recent_uid,
hdr->next_uid,