]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Added mailbox_recent_flags_set_uid_forced()
authorTimo Sirainen <tss@iki.fi>
Mon, 24 Aug 2015 11:01:04 +0000 (14:01 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 24 Aug 2015 11:01:04 +0000 (14:01 +0300)
This allows adding recent flags to mails whose UID is lower than the
existing recent mails.

src/lib-storage/mailbox-recent-flags.c
src/lib-storage/mailbox-recent-flags.h

index 1fa1fe2fe59b950ae288c02b60069b947b95d8ea..1aadfdb180d884a27896ebe1beb6025cc6cca8bb 100644 (file)
@@ -16,6 +16,11 @@ void mailbox_recent_flags_set_uid(struct mailbox *box, uint32_t uid)
                array_clear(&box->recent_flags);
                box->recent_flags_count = 0;
        }
+       mailbox_recent_flags_set_uid_forced(box, uid);
+}
+
+void mailbox_recent_flags_set_uid_forced(struct mailbox *box, uint32_t uid)
+{
        box->recent_flags_prev_uid = uid;
 
        seq_range_array_add_with_init(&box->recent_flags, 64, uid);
index 7065dbcba2856d70b2e32d707a203ded6adfd9e3..1c34442466995548ce181aab5458b35c5461dfd1 100644 (file)
@@ -5,6 +5,7 @@ struct mailbox;
 struct mail_index_view;
 
 void mailbox_recent_flags_set_uid(struct mailbox *box, uint32_t uid);
+void mailbox_recent_flags_set_uid_forced(struct mailbox *box, uint32_t uid);
 void mailbox_recent_flags_set_seqs(struct mailbox *box,
                                   struct mail_index_view *view,
                                   uint32_t seq1, uint32_t seq2);