]> git.notmuchmail.org Git - notmuch/commitdiff
lib: Remove the notion of TAGS_INVALID
authorCarl Worth <cworth@cworth.org>
Thu, 11 Nov 2010 01:45:59 +0000 (17:45 -0800)
committerCarl Worth <cworth@cworth.org>
Thu, 11 Nov 2010 11:40:19 +0000 (03:40 -0800)
This rather ugly hack was recently obviated by the removal of the
notmuch_database_set_maildir_sync function. Now, clients must make
explicit calls to do any syncrhonization between maildir flags and
tags. So the library no longer needs to worry about doing inconsistent
synchronization while a message is only partially added.

lib/database.cc
lib/message.cc
lib/notmuch.h

index 380bbe3daa66e9a878c084b6f1e7fc2b1ace1470..7a00917ec709ce3f7b30fff2699b993d2860840c 100644 (file)
@@ -1642,13 +1642,6 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
 
        _notmuch_message_add_filename (message, filename);
 
-       /* This is a new message or it has a new filename and as such,
-        * its tags in database either do not exists or might be out
-        * of date. We assign the tags later in notmuch new, but until
-        * then we should not synchronize the tags back to the maildir
-        * flags (if notmuch is configured to do so). */
-       notmuch_message_set_flag(message, NOTMUCH_MESSAGE_FLAG_TAGS_INVALID, TRUE);
-
        /* Is this a newly created message object? */
        if (private_status == NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND) {
            _notmuch_message_add_term (message, "type", "mail");
index 88f7c362dc6d2173d3b4b1d3709ed9e9d85e0e48..bc9cd2592adb27e9c0440bf75c41ea9a59bf4fe1 100644 (file)
@@ -882,9 +882,6 @@ notmuch_message_maildir_flags_to_tags (notmuch_message_t *message)
     }
     status = notmuch_message_thaw (message);
 
-    /* From now on, we can synchronize the tags from the database to
-     * the mailstore. */
-    notmuch_message_set_flag (message, NOTMUCH_MESSAGE_FLAG_TAGS_INVALID, FALSE);
     return status;
 }
 
index ca8707e80e8d59229e9316ff17c8849b9ac898db..b15f12499439732448168fdd9731b811203509e7 100644 (file)
@@ -779,8 +779,7 @@ notmuch_message_get_filename (notmuch_message_t *message);
 
 /* Message flags */
 typedef enum _notmuch_message_flag {
-    NOTMUCH_MESSAGE_FLAG_MATCH,
-    NOTMUCH_MESSAGE_FLAG_TAGS_INVALID,
+    NOTMUCH_MESSAGE_FLAG_MATCH
 } notmuch_message_flag_t;
 
 /* Get a value of a flag for the email corresponding to 'message'. */