This is needed to replace GtkPaned by HdyLeaflet. This breaks syncing
the size of the headerbar with the rest of the window, it will be fixed
in a later commit.
Application.MainWindow: Sort folders already available in an account
by path so that FolderListTree is able to add them all successfully.
Application.FolderContext: Implement Gee.Comparable so instances can
be sorted.
Fixes#1004
Get the interface font from Gtk.Settings instead of GLib.Settings since
the latter can't actually access desktop settings under Flatpak.
Partial fix for #989
See also GNOME/glib#2213
Don't use client lib vala ags when building the web process extension,
since that will cause it to also write a VAPI with the same name as
the client lib, causing the build to fail if the web process side wins
that race.
Fixes#985
New composers have no associated GLib Application instance, so when the
main window is already showing a composer and another is opened, the
new composer has no application to pass its window.
Fix by requiring `Composer.detach` be passed an application instance
and find an appropriate instance at each call site.
Convert `get_protocol_state` to an automatic property, so that rather
than requiring explcit signals for lifecycle events, a GObject notify
signal can be used instead.
Convert disconnect signal to a property so it can be accessed if needed.
Convert code listening to the disconnect signal to listen to notify
signals for `protocol_state` instead, and hence also treat the session
as disconnected when a logout is in progress.
Fixes#986
Modernise the API a bit by using properties instead of explicit
getters/setters, an hence support GObject notify signals when the
state property changes.
If the client session is being logging out but some other tasks is
still attempting to use it, getting a mailbox will assume at least
one personal namespace exists, but it will have been cleared.
Add a check and throw an exception if none are present, so at least
it is handled in a well defined way.
Fixes#986
We've had reports on Matrix that existing batch transactions in
`create_or_merge_email_async` are taking up to 30s to run, which is
getting uncomfortably close to the 60s timeout.
Drop the batch size down from 25 to 10 to reduce the chance that this
will eventually fail with a "database is locked" error.
See #921 for context.
Although populating the search table had been broken up into batches
of 50 email, it was still search for and loading every single message
id in both the MessageTable and MessageSearchTable, doing a manual
join, and then updating the batch, for *each* batch, and in a RW
transaction.
Break this up so that the ids are loaded and joined only once, the
queries happens in a RO transaction, the manual join happens in a side
thread, leaving each RW transaction only having to load the messages
and update the search index for up to 50 messages.
Ensure all code paths that execute SQL are logging it if enabled, and
clean up the log formatting.
Add new `enable_result_logging` static property to control result
logging separately from SQL logging, so we can get SQL logged without
having to see email. Clean up result formatting, and keep track of the
current result row number and log that as context.