[evolution-mapi/gnome-3-38] eds-I#286 - Skip collection account refresh when parts disabled
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi/gnome-3-38] eds-I#286 - Skip collection account refresh when parts disabled
- Date: Thu, 7 Jan 2021 17:44:53 +0000 (UTC)
commit 2e72c2d8360f507052686919fb37fff99a6af4ce
Author: Milan Crha <mcrha redhat com>
Date: Thu Jan 7 18:42:54 2021 +0100
eds-I#286 - Skip collection account refresh when parts disabled
It doesn't make sense to ask the server for existing sources, the less
the user for credentials to login to the server, when all the related
parts are disabled.
Related to https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/286
src/collection/e-mapi-backend.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/collection/e-mapi-backend.c b/src/collection/e-mapi-backend.c
index 017781d..d94a3b6 100644
--- a/src/collection/e-mapi-backend.c
+++ b/src/collection/e-mapi-backend.c
@@ -441,13 +441,12 @@ mapi_backend_source_changed_cb (ESource *source,
EMapiBackend *backend)
{
/* does nothing currently */
- if (!e_source_get_enabled (source)) {
+ if (!e_collection_backend_get_part_enabled (E_COLLECTION_BACKEND (backend),
E_COLLECTION_BACKEND_PART_ANY)) {
backend->priv->need_update_folders = TRUE;
return;
}
- if (e_source_get_enabled (source) &&
- e_backend_get_online (E_BACKEND (backend)) &&
+ if (e_backend_get_online (E_BACKEND (backend)) &&
backend->priv->need_update_folders)
mapi_backend_queue_auth_session (backend);
}
@@ -511,7 +510,7 @@ mapi_backend_populate (ECollectionBackend *backend)
mapi_backend->priv->need_update_folders = TRUE;
/* do not do anything, if account is disabled */
- if (!e_source_get_enabled (source))
+ if (!e_collection_backend_get_part_enabled (backend, E_COLLECTION_BACKEND_PART_ANY))
return;
if (!e_collection_backend_freeze_populate (backend)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]