[geary/mjog/email-plugins: 59/61] Plugin.Email: Expose Geary.EmailFlags from the backing email
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/email-plugins: 59/61] Plugin.Email: Expose Geary.EmailFlags from the backing email
- Date: Mon, 30 Mar 2020 10:08:33 +0000 (UTC)
commit e6b8785037a2ca6ff2635715b0b0586814ec9090
Author: Michael Gratton <mike vee net>
Date: Mon Mar 23 00:02:48 2020 +1100
Plugin.Email: Expose Geary.EmailFlags from the backing email
Implement the new property, ensure email has flags loaded when
being loaded.
src/client/application/application-email-store-factory.vala | 12 +++++++++++-
src/client/plugin/plugin-email.vala | 3 +++
2 files changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/src/client/application/application-email-store-factory.vala
b/src/client/application/application-email-store-factory.vala
index 805c6b37..7d7c94f1 100644
--- a/src/client/application/application-email-store-factory.vala
+++ b/src/client/application/application-email-store-factory.vala
@@ -14,6 +14,12 @@
internal class Application.EmailStoreFactory : Geary.BaseObject {
+ private const Geary.Email.Field REQUIRED_FIELDS = (
+ ENVELOPE |
+ FLAGS
+ );
+
+
private class EmailStoreImpl : Geary.BaseObject, Plugin.EmailStore {
@@ -61,7 +67,7 @@ internal class Application.EmailStoreFactory : Geary.BaseObject {
Gee.Collection<Geary.Email> batch =
yield context.emails.list_email_by_sparse_id_async(
accounts.get(account),
- ENVELOPE,
+ REQUIRED_FIELDS,
NONE,
context.cancellable
);
@@ -95,6 +101,10 @@ internal class Application.EmailStoreFactory : Geary.BaseObject {
}
private IdImpl? _id = null;
+ public Geary.EmailFlags flags {
+ get { return this.backing.email_flags; }
+ }
+
public string subject {
get { return this._subject; }
}
diff --git a/src/client/plugin/plugin-email.vala b/src/client/plugin/plugin-email.vala
index 8eb94ddb..554fe4fd 100644
--- a/src/client/plugin/plugin-email.vala
+++ b/src/client/plugin/plugin-email.vala
@@ -16,6 +16,9 @@ public interface Plugin.Email : Geary.BaseObject {
/** Returns a unique identifier for this email. */
public abstract EmailIdentifier identifier { get; }
+ /** Returns the set of mutable flags for the email. */
+ public abstract Geary.EmailFlags flags { get; }
+
/** Returns the subject header value for the this email. */
public abstract string subject { get; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]