[evolution] I#791 - GOA configured Mail accounts don't auto-refresh by default



commit d19d2806af2013fb43c7d84b76d1188be111705b
Author: Milan Crha <mcrha redhat com>
Date:   Wed Feb 19 09:57:22 2020 +0100

    I#791 - GOA configured Mail accounts don't auto-refresh by default
    
    Closes https://gitlab.gnome.org/GNOME/evolution/issues/791

 src/libemail-engine/e-mail-session.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/src/libemail-engine/e-mail-session.c b/src/libemail-engine/e-mail-session.c
index c38a9a3827..a936fee7b6 100644
--- a/src/libemail-engine/e-mail-session.c
+++ b/src/libemail-engine/e-mail-session.c
@@ -616,17 +616,16 @@ mail_session_add_from_source (EMailSession *session,
                CAMEL_SESSION (session), uid,
                backend_name, type, &error);
 
-       if (type == CAMEL_PROVIDER_STORE &&
-           e_source_has_extension (source, E_SOURCE_EXTENSION_MAIL_ACCOUNT)) {
-               ESourceMailAccount *extension;
+       if (type == CAMEL_PROVIDER_STORE) {
+               ESourceMailAccount *account_extension;
                gchar *archive_folder_uri;
 
-               extension = e_source_get_extension (source, E_SOURCE_EXTENSION_MAIL_ACCOUNT);
-               archive_folder_uri = e_source_mail_account_dup_archive_folder (extension);
+               account_extension = e_source_get_extension (source, E_SOURCE_EXTENSION_MAIL_ACCOUNT);
+               archive_folder_uri = e_source_mail_account_dup_archive_folder (account_extension);
                mail_session_remember_archive_folder (session, e_source_get_uid (source), archive_folder_uri);
                g_free (archive_folder_uri);
 
-               g_signal_connect (extension, "notify::archive-folder",
+               g_signal_connect (account_extension, "notify::archive-folder",
                        G_CALLBACK (mail_session_archive_folder_notify_cb), session);
        }
 
@@ -643,13 +642,9 @@ mail_session_add_from_source (EMailSession *session,
        }
 
        /* Set up auto-refresh. */
-       extension_name = E_SOURCE_EXTENSION_REFRESH;
-       if (e_source_has_extension (source, extension_name)) {
+       if (type == CAMEL_PROVIDER_STORE) {
                guint timeout_id;
 
-               /* Transports should not have a refresh extension. */
-               g_warn_if_fail (type != CAMEL_PROVIDER_TRANSPORT);
-
                timeout_id = e_source_refresh_add_timeout (
                        source, NULL, (ESourceRefreshFunc)
                        mail_session_refresh_cb, session,


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