[geary/wip/131-sent-mail: 6/14] Schedule folders for background sync even when open



commit 8d26d9f175cf6707978f372f710a20ec4965681b
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 80ad51ed..2490e859 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]