Commit graph

6 commits

Author SHA1 Message Date
Cédric Bellegarde
1a7a3a987a engine: Cancel any remote folders update before marking a message
When marking a message, a race condition can happen:
- A remote folders update is already running
- We mark the message locally and replay it remotely
- The previous remote update result restores invalid values locally
2022-09-26 11:03:13 +02:00
Michael Gratton
9bd2359464 Geary.Account: Make new_search_query synchronous
Constructing a new query should be fast, and it no longer needs to be
done async, so remove async from the method and simplify callers.
2021-01-19 20:48:17 +11:00
Michael Gratton
0112c8192c Geary.SearchQuery: Allow client apps to build search queries
Adds classes that allow building arbitrary query expressions and require
an instance to be provided to Geary.SearchQuery, to be set as a
property.

This enables query expressions to be parsed by clients instead of the
engine, in which ever whay they choose.
2021-01-19 20:48:17 +11:00
Michael Gratton
df7a30cbe1 Geary.Account: Add {de}register_local_folder methods
Support API clients registering their own local folder implementations.
Use this (and the last commit) to generalise handling of the outbox by
GenericAccount by registering it when the outbox postie is started, and
when creating a map of folders that contain specific ids.

This also ensures API clients are informed of the outbox becoming
available, allowing some special case code to be removed from the app
controller.
2020-08-18 16:32:26 +10:00
Michael Gratton
910228093c Geary.Folder: Add new contains_identifiers method
Add new public method that allows API clients to query whether a folder
contains a specific set of email ids. Add implementation to all
derived classes.
2020-08-18 16:32:26 +10:00
Michael Gratton
2030b2dec7 test: Break out engine mock objects into their own name-space
Engine mocks don't need to be in the `Geary` namespace, and including
them there makes it difficult to use them in client tests, so put them
all in their own name-space and corresponding directory.
2020-08-13 19:51:33 +10:00