Better duplicate detection in local database
This incorporates much better duplicate detection in the local database, using both RFC-822 Message-ID as well as IMAP metadata (internaldate, RFC822 size) to determine if a message is already stored in the database. Very useful when a message is stored in multiple folders, or an already-downloaded message is returned to a folder it originated in (i.e. INBOX). Also some minor fixes to listing email by EmailIdentifier which save a roundtrip to the server for certain edge cases.
This commit is contained in:
parent
d8fe58bf46
commit
f5b7d29a8c
11 changed files with 214 additions and 239 deletions
|
|
@ -186,13 +186,6 @@ private class Geary.Sqlite.Account : Geary.AbstractAccount, Geary.LocalAccount {
|
|||
(properties != null) ? properties.get_imap_folder_properties() : null, path);
|
||||
}
|
||||
|
||||
public async bool has_message_id_async(Geary.RFC822.MessageID message_id, out int count,
|
||||
Cancellable? cancellable = null) throws Error {
|
||||
count = yield message_table.search_message_id_count_async(null, message_id, cancellable);
|
||||
|
||||
return (count > 0);
|
||||
}
|
||||
|
||||
private Geary.Sqlite.Folder? get_sqlite_folder(Geary.FolderPath path) {
|
||||
FolderReference? folder_ref = folder_refs.get(path);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue