[geary/wip/email-flag-refinement-redux: 4/14] Ensure ImapDb.Folder.set_email_flag_async also works on deleted email



commit b8c47c0432fbd221df6148fc837546605e867020
Author: Michael Gratton <mike vee net>
Date:   Wed Feb 13 18:45:25 2019 +1100

    Ensure ImapDb.Folder.set_email_flag_async also works on deleted email
    
    Even deleted email can have its flag updated, e.g. if undeleted from
    another client. Especially important now we are observing the \Deleted
    flag from the server.

 src/engine/imap-db/imap-db-folder.vala | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/engine/imap-db/imap-db-folder.vala b/src/engine/imap-db/imap-db-folder.vala
index fbd51020..b459fb74 100644
--- a/src/engine/imap-db/imap-db-folder.vala
+++ b/src/engine/imap-db/imap-db-folder.vala
@@ -1712,7 +1712,11 @@ private class Geary.ImapDB.Folder : BaseObject, Geary.ReferenceSemantics {
         
         foreach (ImapDB.EmailIdentifier id in map.keys) {
             LocationIdentifier? location = do_get_location_for_id(
-                cx, id, ListFlags.NONE, cancellable
+                cx,
+                id,
+                // Could be setting a flag on a deleted message
+                ListFlags.INCLUDE_MARKED_FOR_REMOVE,
+                cancellable
             );
             if (location == null) {
                 throw new EngineError.NOT_FOUND(


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]