[geary/geary-0.11] Fix Inbox never being prefetched, since it is never sync'ed. Bug 776029
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/geary-0.11] Fix Inbox never being prefetched, since it is never sync'ed. Bug 776029
- Date: Sun, 18 Dec 2016 15:36:41 +0000 (UTC)
commit 1bc32513bfb172ef36e5d73c9270adf3e64b291b
Author: Michael James Gratton <mike vee net>
Date: Tue Dec 13 13:07:14 2016 +1100
Fix Inbox never being prefetched, since it is never sync'ed. Bug 776029
Since the Inbox is usually always open, and folders are only sync'ed if
they are closed, the Inbox would rarely, if ever, get sync'ed. As a
result, it would also never be prefetched.
* src/engine/imap-engine/imap-engine-account-synchronizer.vala
(AccountSynchronizer::send_all): Always sync a folder when it becomes
available, even if it is open, so on reconnect/etc, even the Inbox is
sync'ed.
(AccountSynchronizer::process_folder_async): If an error occurs, keep
note of whether the sync was due to the folder becoming available or
not when re-scheduling it.
.../imap-engine-account-synchronizer.vala | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/engine/imap-engine/imap-engine-account-synchronizer.vala
b/src/engine/imap-engine/imap-engine-account-synchronizer.vala
index c4d8fd7..a41c72f 100644
--- a/src/engine/imap-engine/imap-engine-account-synchronizer.vala
+++ b/src/engine/imap-engine/imap-engine-account-synchronizer.vala
@@ -148,9 +148,11 @@ private class Geary.ImapEngine.AccountSynchronizer : Geary.BaseObject {
// if considering folder not because it's available (i.e. because its contents changed),
// and the folder is open, don't process it; MinimalFolder will take care of changes as
// they occur, in order to remain synchronized
- if (imap_folder.get_open_state() != Folder.OpenState.CLOSED)
+ if (!reason_available &&
+ imap_folder.get_open_state() != Folder.OpenState.CLOSED) {
continue;
-
+ }
+
// don't requeue the currently processing folder
if (imap_folder != current_folder)
bg_queue.send(imap_folder);
@@ -336,7 +338,7 @@ private class Geary.ImapEngine.AccountSynchronizer : Geary.BaseObject {
debug("Unable to open %s: %s", folder.to_string(), err.message);
// retry later
- delayed_send_all(iterate<Folder>(folder).to_array_list(), false, RETRY_SYNC_DELAY_SEC);
+ delayed_send_all(iterate<Folder>(folder).to_array_list(), availability_check,
RETRY_SYNC_DELAY_SEC);
return true;
}
@@ -351,7 +353,7 @@ private class Geary.ImapEngine.AccountSynchronizer : Geary.BaseObject {
debug("Error background syncing folder %s: %s", folder.to_string(), err.message);
// retry later
- delayed_send_all(iterate<Folder>(folder).to_array_list(), false, RETRY_SYNC_DELAY_SEC);
+ delayed_send_all(iterate<Folder>(folder).to_array_list(), availability_check,
RETRY_SYNC_DELAY_SEC);
}
// fallthrough and close
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]