[geary/wip/713530-background-sync: 9/9] Enforce a an API contract clause for Geary.Folder.list_email_by_id_async.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/713530-background-sync: 9/9] Enforce a an API contract clause for Geary.Folder.list_email_by_id_async.
- Date: Fri, 1 Dec 2017 02:30:33 +0000 (UTC)
commit d124c07508e7eb2f389eccbe10c6524c2d2116ec
Author: Michael James Gratton <mike vee net>
Date: Fri Dec 1 13:21:41 2017 +1100
Enforce a an API contract clause for Geary.Folder.list_email_by_id_async.
* src/engine/imap-engine/replay-ops/imap-engine-list-email-by-id.vala
(AbstractListEmail): Throw an error if asking for a specific message,
asking for it to be included in the results, but the message not
actually appearing in the results.
.../replay-ops/imap-engine-list-email-by-id.vala | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/engine/imap-engine/replay-ops/imap-engine-list-email-by-id.vala
b/src/engine/imap-engine/replay-ops/imap-engine-list-email-by-id.vala
index ab3f0e2..703e0cc 100644
--- a/src/engine/imap-engine/replay-ops/imap-engine-list-email-by-id.vala
+++ b/src/engine/imap-engine/replay-ops/imap-engine-list-email-by-id.vala
@@ -57,7 +57,14 @@ private class Geary.ImapEngine.ListEmailByID : Geary.ImapEngine.AbstractListEmai
add_unfulfilled_fields(uid, required_fields.clear(email.fields));
}
}
-
+
+ if (this.flags.is_including_id() && this.initial_uid == null) {
+ throw new EngineError.NOT_FOUND(
+ "Initial id not found in local set: %s",
+ this.initial_id.to_string()
+ );
+ }
+
// report fulfilled items
fulfilled_count = fulfilled.size;
if (fulfilled_count > 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]