Don't use the database for internal ConversationMonitor bookkeeping.
This replaces the use of Geary.Folder.find_boundaries_async in ConversationMonitor with a simple sorted set of known in-folder message ids. This is both easy and fast, reduces needless DB load when loading conversations, and also allows allows removing what is otherwise single-use implementation overhead in classes deriving from Folder. * src/engine/app/app-conversation-monitor.vala (ConversationMonitor): Replace get_lowest_email_id_async() with window_lowest property, update call sites. Implement the property by using a sorted set of known listed email ids from the base folder. Update the set as messages in the base folder are listed. Rename notify_emails_removed to just removed and remove ids from the set if any messages from the base folder are removed. * src/engine/api/geary-folder.vala (Folder): Remove get_lowest_email_id_async since it is now unused, do same for all subclasses.
This commit is contained in:
parent
712088061b
commit
0ea1fe6c35
10 changed files with 67 additions and 144 deletions
|
|
@ -71,16 +71,6 @@ public class Geary.MockFolder : Folder {
|
|||
throw new EngineError.UNSUPPORTED("Mock method");
|
||||
}
|
||||
|
||||
public override async void
|
||||
find_boundaries_async(Gee.Collection<Geary.EmailIdentifier> ids,
|
||||
out Geary.EmailIdentifier? low,
|
||||
out Geary.EmailIdentifier? high,
|
||||
Cancellable? cancellable = null)
|
||||
throws Error {
|
||||
throw new EngineError.UNSUPPORTED("Mock method");
|
||||
}
|
||||
|
||||
|
||||
public override async Gee.List<Geary.Email>?
|
||||
list_email_by_id_async(Geary.EmailIdentifier? initial_id,
|
||||
int count,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue