This is used to increase modseq for mails when their private flags change.
Use an already existing MAIL_TRANSACTION_FLAG_UPDATE_IS_INTERNAL() that
does this properly.
(This change preserves another bug, which is fixed in the next commit.)
flag_updates_have_non_internal(const struct mail_transaction_flag_update *u,
unsigned int count, unsigned int version)
{
- const uint8_t internal_flags =
- MAIL_INDEX_MAIL_FLAG_BACKEND | MAIL_INDEX_MAIL_FLAG_DIRTY;
-
/* Hide internal flags from modseqs if the log file's version
is new enough. This allows upgrading without the modseqs suddenly
shrinking. */
return TRUE;
for (unsigned int i = 0; i < count; i++) {
- uint8_t changed_flags = u->add_flags | u->remove_flags;
-
- if ((changed_flags & ~internal_flags) != 0)
+ if (!MAIL_TRANSACTION_FLAG_UPDATE_IS_INTERNAL(u))
return TRUE;
}
return FALSE;