[geary] Fix some issues opening mailboxes from Bug 789924 / commit fddf609.



commit f913d18364480a29378e222a367a0fc681c736bf
Author: Michael James Gratton <mike vee net>
Date:   Thu Jan 11 15:35:22 2018 +1100

    Fix some issues opening mailboxes from Bug 789924 / commit fddf609.
    
    * src/engine/imap-engine/imap-engine-minimal-folder.vala
      (MinimalFolder.start_open_remote): Don't check to see if the timer is
      running before opening the remote, just do it since this method is only
      called when the remote should be opened.
      (MinimalFolder.on_remote_ready): Only start opening the remote if
      actually needed.

 .../imap-engine/imap-engine-minimal-folder.vala    |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/engine/imap-engine/imap-engine-minimal-folder.vala 
b/src/engine/imap-engine/imap-engine-minimal-folder.vala
index 6522803..09ca75d 100644
--- a/src/engine/imap-engine/imap-engine-minimal-folder.vala
+++ b/src/engine/imap-engine/imap-engine-minimal-folder.vala
@@ -597,11 +597,9 @@ private class Geary.ImapEngine.MinimalFolder : Geary.Folder, Geary.FolderSupport
     }
 
     private void start_open_remote() {
-        if (!this.remote_opened &&
-            !this.remote_open_timer.is_running &&
-            this.remote.is_ready) {
-            this.remote_open_timer.reset();
+        if (!this.remote_opened && this.remote.is_ready) {
             this.remote_opened = true;
+            this.remote_open_timer.reset();
             this.open_remote_async.begin(null);
         }
     }
@@ -1554,6 +1552,8 @@ private class Geary.ImapEngine.MinimalFolder : Geary.Folder, Geary.FolderSupport
     }
 
     private void on_remote_ready() {
-        start_open_remote();
+        if (this.open_count > 0) {
+            start_open_remote();
+        }
     }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]