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.
This commit is contained in:
Michael James Gratton 2018-01-11 15:35:22 +11:00 committed by Michael Gratton
parent 3a47017ee4
commit 7d1de0d9c0

View file

@ -622,11 +622,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);
}
}
@ -1536,7 +1534,9 @@ 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();
}
}
}