[geary/wip/131-sent-mail: 10/15] Schedule folders for background sync even when open
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/131-sent-mail: 10/15] Schedule folders for background sync even when open
- Date: Tue, 13 Aug 2019 21:40:33 +0000 (UTC)
commit 7b9346fbb98448f72c874dc750de158d82c35ae1
Author: Michael Gratton <mike vee net>
Date: Thu Aug 8 23:04:46 2019 +1000
Schedule folders for background sync even when open
Although the folder normalisation process and email prefetcher should
be enough to sync a folder without requiring an explcit sync, if the
folder opens and closes fast enough that new mail is notified but not
downloaded, the folder will still close and the mail will be missed.
To fix this, if a folder has changed, queue it for sync'ing even if it
is currently open.
src/engine/imap-engine/imap-engine-account-synchronizer.vala | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/src/engine/imap-engine/imap-engine-account-synchronizer.vala
b/src/engine/imap-engine/imap-engine-account-synchronizer.vala
index 4e1b0692..1fdae636 100644
--- a/src/engine/imap-engine/imap-engine-account-synchronizer.vala
+++ b/src/engine/imap-engine/imap-engine-account-synchronizer.vala
@@ -33,10 +33,6 @@ private class Geary.ImapEngine.AccountSynchronizer : Geary.BaseObject {
// Only sync folders that:
// 1. Can actually be opened (i.e. are selectable)
// 2. Are remote backed
- // and 3. if considering a folder not because it's
- // contents changed (i.e. didn't just become available,
- // only sync if closed, otherwise he folder will keep
- // track of changes as they occur
//
// All this implies the folder must be a MinimalFolder and
// we do require that for syncing at the moment anyway,
@@ -46,9 +42,7 @@ private class Geary.ImapEngine.AccountSynchronizer : Geary.BaseObject {
if (imap_folder != null &&
folder.properties.is_openable.is_possible() &&
!folder.properties.is_local_only &&
- !folder.properties.is_virtual &&
- (became_available ||
- imap_folder.get_open_state() == Folder.OpenState.CLOSED)) {
+ !folder.properties.is_virtual) {
AccountOperation op = became_available
? new CheckFolderSync(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]