EmailPrefetecher was deliberately ignoring new mail found during
folder normalisation on folder open to avoid the kind of deadlock
solved by the last commit. Since this is no longer a problem, it can
now stop dropping those.
This should fix a number of issues where email is only partly
downloaded.
Since MinimalFolder.synchronize_remote() waits for the prefetcher to
finish, but the prefetcher only closes when the folder closes, this
could deadlock.
Part of https://gitlab.gnome.org/GNOME/Initiatives/issues/1;
Sets up dual installation for flatpaks, allowing us to
build and run geary without affecting our system install.
This will allow testing of nightlies and CI artifacts as well
via the flatpak, so we can iterate on designs and share
bundles to test with.
Ensure that the client connection is disconnected when the deserialiser
receives an EOS from its underlying stream. Rename the signal used
by Imap.ClientConnection to notify the Imap.ClientSession of EOS to make
it more clear what is going on.
Resolves the issue in #481 where an EOS was recevied but the connection
was not pulled down until after a NOOP was sent and timed out.
In an attempt to prevent ConversationMonitor for blocking when a
connection went bad, load operations were set to local-only when
the remote was not open. This meant however that if the remote was in
the process of being opened, that local-only would be set, and hence any
incomplete messages would fail to be downloaded. Now that the Fill op
now explicitly handles filling local-only by default, we can remove
this.
This ensures that when the conversation monitor is notified of new
messages, but they are not yet fullly downloaded since the prefetcher
is still running, that the messge will still show up.
At least GMail takes some time to copy new messages to the Sent folder
on the server side when sending them, which means the mail may not show
up even after doing a manual remote sync.
This adds an explicit poll, listing new mail in Sent after sending
a message to check for the sent message showing up.
Since the NOOP that ::synchronise_remote sends doesn't go through the
replay queue, it will throw an error if the connection has gone bad.
Instead, catch it and retry.
Ensure that sent mail shows up in a conversartion ASAP for Google,
Outlook and others that automatically save sent mail by performing a
manual sync of the Sent folder after delivering the mail.
If the server supports UID plus, update the message after it was
created to get its IMAP fields and anything else missing filled in.
If not, schedule a explicit folder sync.
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.
Add Geary.Folder::synchronise_remote method to allow clients to
explicitly check for new mail in a folder. Move code from
ImapEngine.AccountSynchronizer as the basic implementation, but also
ensure pending replay queue notifications are processed before the
process is complete.
When the remote re-opens, new messages may have become available that
could be added to the conversation set if the window is not yet full.
Thus always check whether a fill operation should be queued.
Two of my account's databases had duplicate inboxes which were not being
removed by the existing workaroud, this updates it so that they are.
I had removed the duplicate from a third account ages ago and it hasn't
come back since, so maybe the underlying problem is gone, but the
correct fix would be to move this workaround to a migration and add a
uniquness constraint on (parent_id, name).
After switching to DBus activation, we need to ensure that a controller
is present when arbitrary GApplication actions are executed so a
main window also exists. This lead to a deadlock on first run since
when the application was activated, it would be in the middle of
constructing the controller when it showed the Accounts Editor, which
would block since it would also try to construct a controller.
This fixes the deadlock by moving the first-run check to the
application, outside of the lock.