-
Daniel Vrátil authored
For instance when an email is marked as unread on an IMAP server, it means that the \\SEEN flag is removed. If this was the only flag set on the email, then Akonadi::ItemSync will end up calling Akonadi::Item::setFlags() with an empty QSet. When the AKAPPEND handler is in the MERGE mode and runs into an empty Flags field in the CreateItemCommand it fallsback to checking AddedFlags and RemovedFlags fields, but those are empty too. Akonadi::Item internally tracks when setFlags() is called, even with an empty QSet through flagsOverwritten flag. With this change the flag is sent as part of the command to the server and the AKAPPEND handler now falls back to AddedFlags/RemovedFlags fields only if the flag is false. This fixes syncing email flags when email state changes from read to unread on IMAP, but due to how IMAP emails are synced this will only affect future changes and will not sync existing out-of-sync emails. BUG: 375146 FIXED-IN: 5.5.1
e49f49a1