[evolution-mapi] Avoid local message cache expiry clean up when being offline



commit b608164ae1ccc0553e79c60f60983a3dc00ed32b
Author: Milan Crha <mcrha redhat com>
Date:   Fri Feb 10 15:05:57 2017 +0100

    Avoid local message cache expiry clean up when being offline
    
    When an account is offline, then its locally stored messages
    should not be removed due to expiry, such thing should be
    done only in online, otherwise it could make message available
    in one second and then re-selecting it a second later it being
    unavailable, which is rather confusing and unexpected.

 src/camel/camel-mapi-folder.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/camel/camel-mapi-folder.c b/src/camel/camel-mapi-folder.c
index f49f40b..e72bed8 100644
--- a/src/camel/camel-mapi-folder.c
+++ b/src/camel/camel-mapi-folder.c
@@ -2091,6 +2091,10 @@ camel_mapi_folder_new (CamelStore *store,
                camel_data_cache_set_expire_access (mapi_folder->cache, 60 * 60 * 24 * 7);
        }
 
+       camel_binding_bind_property (store, "online",
+               mapi_folder->cache, "expire-enabled",
+               G_BINDING_SYNC_CREATE);
+
        if (filter_inbox) {
                CamelFolderInfo *fi;
 


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