[evolution-data-server] [IMAPx] Junk/NotJunk message flags not stored server-side



commit b713cb8467d4efd07f2d5083832866723f1a695b
Author: Milan Crha <mcrha redhat com>
Date:   Mon Aug 31 15:20:36 2015 +0200

    [IMAPx] Junk/NotJunk message flags not stored server-side
    
    The Junk/NotJunk flags are not standard flags, they are user flags,
    thus, when parsing mailbox's permanent flags response, the Junk/NotJunk
    flags should be added to the list of supported flags by the server.
    This is true for folders which did not contain any Junk/NotJunk marked
    messages yet.

 camel/providers/imapx/camel-imapx-mailbox.c |    5 +++++
 camel/providers/imapx/camel-imapx-server.c  |   19 -------------------
 2 files changed, 5 insertions(+), 19 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-mailbox.c b/camel/providers/imapx/camel-imapx-mailbox.c
index 501dd56..59b8765 100644
--- a/camel/providers/imapx/camel-imapx-mailbox.c
+++ b/camel/providers/imapx/camel-imapx-mailbox.c
@@ -745,6 +745,11 @@ camel_imapx_mailbox_set_permanentflags (CamelIMAPXMailbox *mailbox,
 {
        g_return_if_fail (CAMEL_IS_IMAPX_MAILBOX (mailbox));
 
+       if ((permanentflags & CAMEL_MESSAGE_USER) != 0) {
+               permanentflags |= CAMEL_MESSAGE_JUNK;
+               permanentflags |= CAMEL_MESSAGE_NOTJUNK;
+       }
+
        mailbox->priv->permanentflags = permanentflags;
 }
 
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index d8e2fee..2f77b2b 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -337,25 +337,6 @@ enum {
        IMAPX_SELECTED
 };
 
-/* Mailbox management operations have highest priority
- * since we know for sure that they are user triggered. */
-enum {
-       IMAPX_PRIORITY_MAILBOX_MGMT = 200,
-       IMAPX_PRIORITY_SYNC_CHANGES = 150,
-       IMAPX_PRIORITY_EXPUNGE = 150,
-       IMAPX_PRIORITY_SEARCH = 150,
-       IMAPX_PRIORITY_GET_MESSAGE = 100,
-       IMAPX_PRIORITY_REFRESH_INFO = 0,
-       IMAPX_PRIORITY_NOOP = 0,
-       IMAPX_PRIORITY_NEW_MESSAGES = 0,
-       IMAPX_PRIORITY_APPEND_MESSAGE = -60,
-       IMAPX_PRIORITY_COPY_MESSAGE = -60,
-       IMAPX_PRIORITY_LIST = -80,
-       IMAPX_PRIORITY_IDLE = -100,
-       IMAPX_PRIORITY_SYNC_MESSAGE = -120,
-       IMAPX_PRIORITY_UPDATE_QUOTA_INFO = -80
-};
-
 struct _imapx_flag_change {
        GPtrArray *infos;
        gchar *name;


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