Commit 438f74dc authored by Michael Gratton's avatar Michael Gratton 🤞 Committed by Michael Gratton

Pass a email id with a position when setting flags during a merge

This ensures that flag updates actually happen when doing a merge
with remote email instances obtained from the IMAP stack.
parent 4575f68a
......@@ -2008,12 +2008,20 @@ private class Geary.ImapDB.Folder : BaseObject, Geary.ReferenceSemantics {
unread_count_change += email.email_flags.is_unread() ? 1 : -1;
}
Gee.Map<ImapDB.EmailIdentifier, Geary.EmailFlags> map =
new Gee.HashMap<ImapDB.EmailIdentifier, Geary.EmailFlags>();
map.set((ImapDB.EmailIdentifier) email.id, email.email_flags);
do_set_email_flags(cx, map, cancellable);
// do_set_email_flags requires a valid message location,
// but doesn't accept one as an arg, so despite knowing
// the location here, make sure we pass an id with a
// message_id in so it can look the location back up.
do_set_email_flags(
cx,
Collection.single_map<ImapDB.EmailIdentifier,Geary.EmailFlags>(
(ImapDB.EmailIdentifier) row_email.id, email.email_flags
),
cancellable
);
post_fields |= Geary.Email.Field.FLAGS;
}
}
......
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