This simplifies the various Folder implementations, removes one (large)
replay queue operation, makes vector expansion _much_ simpler, and
generally makes the Geary API a bit cleaner.
Because the code affected included some of the proposed fixes for
operation. That plus the vector expansion changes may have some
affect on that ticket.
The recent fix to support dotstuffing (#7173) introduced a regression
where it was possible for incomplete SMTP buffers (i.e. the message)
to be delivered.
The SMTP layer now deals in Memory.Buffer objects, which required
some small changes to the Authentication interface. Also, some
missing error-handling in RFC822.Message was introduced.
a couple of assertions in the code could cause a similar problem, so this removes
them and replaces them with log messages. Later code in the code path deals with
this problem in a more sane manner.
More specifically, I believe the IMAP rework deals with the problems of certain
servers returning the preview information out-of-order and in separate server data
lines properly.
I had mistakenly used == to compare FolderPaths, which have their own
equal_to method.
Also, this cleans up a bit of the ConversationSet logic that wasn't
needed since EmailIdentifiers take folder_path into account in their
hash and equal_to methods.
The prior ImapEngine.EmailPrefetcher pulled messages one at a time to
prevent hogging the connection with lots of data (when a lot of new mail is
detected). This patch simplifies some of the preparation code and
pulls the mail down in 128K batches, meaning multiple small messages are
pulled at once, meaning quicker availability without blocking the connection
entirely.
This accomplishes a few things:
* Adds some signals to the Account that aggregate various Folder
signals, so anyone can find out when mail has been appended to any
folder, for example.
* Refactors the ConversationMonitor further. The conversation grouping
logic has been split out into a ConversationSet, and
ConversationMonitor proper is now just the folder interaction.
* The new ConversationSet tracks duplicate emails better using
Message-IDs, so if you get an email in multiple folders we can figure
out whether we should actually add it as a new email or not.
* Using all of that, we now kick off a full-conversations update
whenever new mail comes in on any folder, so your conversations update
as you're looking at them when Geary sees new mail, regardless of
folder.
Since IMAP's response codes are open-ended and subject to further
additions, this also reworks the ResponseCodeType to be more
flexible in what it represents (any atom rather than a fixed enum
of values).
This is something I've noticed rarely but finally figured it out.
Occassionally my first archive operation will involve multiple
conversations. In that case, current_conversation and last_deleted_conversation
will both be null, causing the "don't archive last archived conversation"
check to succeed. This works around this problem.
Bruno Girin on the mailing list noticed Geary churning constantly.
Some investigation and I was able to repro it -- an off-by-one
error was causing the flag watcher to forever pull the oldest
email's flags. This catches that as well as spaces out the
timeout so the next round of fetching happens a full timeout
sequence after the last flags are pulled (rather than starting at
regular intervals, which can come in close on low-powered machines).
This simplifies some code, including ImapEngine.AccountSynchronizer,
which previously had to use the position field to "walk" backward
through the folder looking for the email of the appropriate epoch.
Now, a single SEARCH command gets the necessary information.
Assertion is incorrect here because it's possible for the data
not to be returned for valid reasons -- usually a command response
failure (i.e. "NO"). Still want to log it for debugging purposes,
but don't crash when it happens.
Note that this patch also won't return the email if it doesn't
fulfill all the fields.
A recent commit made Geary.Folder's FolderProperties a property
(rather than available via a getter). This commit makes its
FolderPath and SpecialFolderType also properties.
More significant problem is that new symbol (from #6428) requires
GTK 3.6, so moved requirements up for it and Vala, plus couple
more than should've been updated a while back.