Fast listing of messages in a folder
This adds a new flag when listing messages, FAST. This indicates that the caller wants messages that are immediately available to the Folder, avoiding a round-trip to the server (or even disk) if possible. Not all folders will support FAST, but it can be used (as it is now in the client) to quickly populate the message list and then initiate a connection in the background to get the straight dope.
This commit is contained in:
parent
aa3044f57d
commit
428c0825a9
10 changed files with 187 additions and 80 deletions
|
|
@ -46,6 +46,10 @@ public class Geary.Sqlite.Folder : Geary.AbstractFolder, Geary.LocalFolder, Gear
|
|||
return properties;
|
||||
}
|
||||
|
||||
public override Geary.Folder.ListFlags get_supported_list_flags() {
|
||||
return Geary.Folder.ListFlags.NONE;
|
||||
}
|
||||
|
||||
internal void update_properties(Geary.Imap.FolderProperties? properties) {
|
||||
this.properties = properties;
|
||||
}
|
||||
|
|
@ -114,7 +118,8 @@ public class Geary.Sqlite.Folder : Geary.AbstractFolder, Geary.LocalFolder, Gear
|
|||
}
|
||||
|
||||
public override async Gee.List<Geary.Email>? list_email_async(int low, int count,
|
||||
Geary.Email.Field required_fields, Cancellable? cancellable) throws Error {
|
||||
Geary.Email.Field required_fields, Geary.Folder.ListFlags flags, Cancellable? cancellable)
|
||||
throws Error {
|
||||
check_open();
|
||||
|
||||
normalize_span_specifiers(ref low, ref count, yield get_email_count_async(cancellable));
|
||||
|
|
@ -129,7 +134,8 @@ public class Geary.Sqlite.Folder : Geary.AbstractFolder, Geary.LocalFolder, Gear
|
|||
}
|
||||
|
||||
public override async Gee.List<Geary.Email>? list_email_sparse_async(int[] by_position,
|
||||
Geary.Email.Field required_fields, Cancellable? cancellable = null) throws Error {
|
||||
Geary.Email.Field required_fields, Geary.Folder.ListFlags flags, Cancellable? cancellable = null)
|
||||
throws Error {
|
||||
check_open();
|
||||
|
||||
Gee.List<MessageLocationRow>? list = yield location_table.list_sparse_async(folder_row.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue