Commit 272d95e3 authored by Michael Gratton's avatar Michael Gratton 🤞 Committed by Michael Gratton

Add Email.Field.FIELDS to ImapDb.Folder.REQUIRED_FIELDS

This is especially needed since when moving a message from one folder to
another, the copy's flags are will un-flag it as deleted, so it actually
shows up again in conversations after the MoveEmailCommit op deletes the
original in the source folder.

This also has the extra benefit however of makig sure the engine knows
up-front what the uread state of all new mail is, and hence might
actaully get unread counts correct.
parent 0d3733b0
Pipeline #59183 failed with stages
in 14 minutes and 16 seconds
......@@ -20,7 +20,16 @@ private class Geary.ImapDB.Folder : BaseObject, Geary.ReferenceSemantics {
/**
* Fields required for a message to be stored in the database.
*/
public const Geary.Email.Field REQUIRED_FIELDS = Geary.Email.Field.PROPERTIES|Email.Field.REFERENCES;
public const Geary.Email.Field REQUIRED_FIELDS = (
// Required for primary duplicate detection done with properties
Email.Field.PROPERTIES |
// Required for secondary duplicate detection via UID
Email.Field.REFERENCES |
// Required to ensure the unread count is up to date and so
// that when moving a message, the new copy turns back up as
// being not deleted.
Email.Field.FLAGS
);
/**
* Fields required for a message to be considered for full-text indexing.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment