Make constructors use the Message.from_gmime where possible. Merge that
and stock_from_gmime so it's clear the stocking only happens in the
ctor. Update stocking to use high-level GMime APIs where available to
avoid re-parsing header values.
Split Geary.RFC822.MessageData interface up into DecodedMessageData and
EncodedMessageData so the difference between the two is clear and they
can't be used interchangeably.
Add `DecodedMessageData::to_rfc822_string` to provide a common interface
for round-tripping decoded data.
Update all classes to implement one of these and follow the same general
API patterns.
Add some doc comments, fix some methods to ensure the class is actually
immutable, remove some unused methods, add ctor from the GMime
equivalent object.
Mark the service as unreachable if a connectivity check error occurs
since if we can't determine it is reachable, we probably can't connect
to it either.
When a general error occurs checking connectivity of a remote server,
only treat it as an error if GNetworkMonitor indicates the network is
available (i.e. that a default route exists). If there is no network,
it's not surprising that the error occurred.
This fixes a spurious error when the delayed check runs but the host
is offline.
Ensure that if stopping the conversation monitor while it is waiting
for the folder to open that the folder isn't closed, and if an error
is thrown when opening the folder that it gets thrown by
::start_monitoring anyway.
Hopefully fixes#741
When loading an account for the first time, folders may not be processed
such that parents are handled first, leading to phantom folders created
for them.
This is particularly noticeable for GMail accounts, where the `[GMail]`
folder would typically show up, since it was created twice.
Add `create_personal_folder` method, implement it in
ImapEngine.GenericAccount. Use this when creating required special
folders to reduce code duplication.
Set local folder special use when they are loaded rather than doing it
in two steps, so that when client code is notified of the folders
being available, they will already have the correct special type.
Use a simple list of strings to store path steps, since we don't know
what the root will be in advance, and this leads to errors if callers
try to compare the info's paths to (say) an actual IMAP path.
Store path steps in a SpecialUse to path step map property, rather than
as individual properties for each special use, to reduce repetition.
Replace open method with an async ctor, so we can make a few properties
non-null by default, and callers need to call one less call. Make
destination folder configurable, and require email flags passed in
via the ctor, not every time when saving.
When the drafts folder is selected, and a draft is being edited, and
that dis discarded, there is a race between the composer disappearing
(and hence the draft being shown again) and the draft itself being
removed from the folder. Attempt to check for this and avoid reporting
the problem.
When displaying a new empty composer, only consider those attached to
the current main window. Ensure that when re-using an existing composer,
that no composers in the undo buffer are used. Ensure drafts are
displayed full-pane when appropriate. Clean up redundant parts of
the `show_composer` API a bit.
Clean up and simplify how composers are constructed. Ensure all
composers are constructed via Application.Composer. Provide a set of
APIs for constructing different kinds of composers with minimal
parameters, rather than having one method with eleventy different
parameters.
Mirror API changes in Composer.Widget by splitting `load` method up
into a method for each different composer type. Clean up internals a
bit as a result. Rename `ComposeType` enum and its values to
`ContextType` to better reflect what it does.
Expect the same variant format for the `show-folder` and `show-email`
application actions. Use existing email and folder store factory
lookup methods for these. Update DesktopNotifications plugin to simply
pass variant values from plugin classes through to notifications.