Geary fails to report newly arrived email: Closes #5114

This appears to be a timing issue between a message being deleted
and a message arriving at approx. the same time.  The new event
handler dealing with incoming mail is not so strict and uses UID
addressing to be more generous in scooping up any new email than
it has in the local store.

*Believe* this to be fixed, but as this is so difficult to repro
and diagnose, there may still be some cases out there.
This commit is contained in:
Jim Nelson 2012-05-02 21:22:52 -07:00
parent 47b87f6417
commit 5a2a371e01
7 changed files with 133 additions and 43 deletions

View file

@ -445,10 +445,19 @@ private class Geary.Sqlite.Folder : Object, Geary.ReferenceSemantics {
}
public async Geary.Imap.UID? get_earliest_uid_async(Cancellable? cancellable = null) throws Error {
return yield get_uid_extremes_async(true, cancellable);
}
public async Geary.Imap.UID? get_latest_uid_async(Cancellable? cancellable = null) throws Error {
return yield get_uid_extremes_async(false, cancellable);
}
private async Geary.Imap.UID? get_uid_extremes_async(bool earliest, Cancellable? cancellable)
throws Error {
check_open();
int64 ordering = yield location_table.get_earliest_ordering_async(null, folder_row.id,
cancellable);
int64 ordering = yield location_table.get_ordering_extremes_async(null, folder_row.id,
earliest, cancellable);
return (ordering >= 1) ? new Geary.Imap.UID(ordering) : null;
}