[evolution-data-server] evo-I#479 - Call mail account refresh also after going online ][
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] evo-I#479 - Call mail account refresh also after going online ][
- Date: Thu, 27 Jun 2019 16:57:33 +0000 (UTC)
commit 38452d90595d1bd731b074eeaca3c363e16c30d8
Author: Milan Crha <mcrha redhat com>
Date: Thu Jun 27 18:59:03 2019 +0200
evo-I#479 - Call mail account refresh also after going online ][
The CamelOfflineStore did not reconnect once it disconnected, only
after whole CamelSession went offline and online.
Related to https://gitlab.gnome.org/GNOME/evolution/issues/479
src/camel/camel-offline-store.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/camel/camel-offline-store.c b/src/camel/camel-offline-store.c
index d14929858..09f8b54cc 100644
--- a/src/camel/camel-offline-store.c
+++ b/src/camel/camel-offline-store.c
@@ -155,12 +155,7 @@ offline_store_notify (GObject *object,
g_object_notify (object, "online");
else if (g_strcmp0 (pspec->name, "connection-status") == 0 &&
camel_service_get_connection_status (CAMEL_SERVICE (object)) == CAMEL_SERVICE_DISCONNECTED) {
- CamelOfflineStore *store = CAMEL_OFFLINE_STORE (object);
-
- if (store->priv->online) {
- store->priv->online = FALSE;
- g_object_notify (object, "online");
- }
+ g_object_notify (object, "online");
}
/* Chain up to parent's notify() method. */
@@ -253,8 +248,10 @@ camel_offline_store_set_online_sync (CamelOfflineStore *store,
g_return_val_if_fail (CAMEL_IS_OFFLINE_STORE (store), FALSE);
- if (camel_offline_store_get_online (store) == online)
+ if (camel_offline_store_get_online (store) == online && (!online ||
+ camel_service_get_connection_status (CAMEL_SERVICE (store)) == CAMEL_SERVICE_CONNECTED)) {
return TRUE;
+ }
service = CAMEL_SERVICE (store);
@@ -273,7 +270,8 @@ camel_offline_store_set_online_sync (CamelOfflineStore *store,
CAMEL_NETWORK_SERVICE (store));
}
- store_is_online = camel_offline_store_get_online (store);
+ store_is_online = camel_offline_store_get_online (store) &&
+ camel_service_get_connection_status (service) == CAMEL_SERVICE_CONNECTED;
/* Returning to online mode is the simpler case. */
if (!store_is_online) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]