[geary/wip/730682-refine-convo-list] Property set up Email field consts on new list model and preview loader.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/730682-refine-convo-list] Property set up Email field consts on new list model and preview loader.
- Date: Sun, 24 Dec 2017 08:10:46 +0000 (UTC)
commit 4388209c218abbb73d839e7aa32801a2198ce20e
Author: Michael James Gratton <mike vee net>
Date: Tue Dec 12 09:58:52 2017 +1100
Property set up Email field consts on new list model and preview loader.
src/client/application/geary-controller.vala | 2 +-
.../conversation-list/conversation-list-model.vala | 7 +++++++
src/client/conversation-list/preview-loader.vala | 15 ++++++++++-----
3 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index e3667c5..6d54410 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -1330,7 +1330,7 @@ public class GearyController : Geary.BaseObject {
current_conversations = new Geary.App.ConversationMonitor(
current_folder,
Geary.Folder.OpenFlags.NO_DELAY,
- ConversationListStore.REQUIRED_FIELDS,
+ ConversationListModel.REQUIRED_FIELDS,
CONVERSATION_PAGE_SIZE * 2 // load double up front when not scrolling
);
diff --git a/src/client/conversation-list/conversation-list-model.vala
b/src/client/conversation-list/conversation-list-model.vala
index e0171b6..61b28ad 100644
--- a/src/client/conversation-list/conversation-list-model.vala
+++ b/src/client/conversation-list/conversation-list-model.vala
@@ -18,6 +18,13 @@
public class ConversationListModel : Geary.BaseObject, GLib.ListModel {
+ /** Email fields required to load the message in this model. */
+ public const Geary.Email.Field REQUIRED_FIELDS =
+ Geary.Email.Field.ENVELOPE |
+ Geary.Email.Field.FLAGS |
+ Geary.Email.Field.PROPERTIES;
+
+
/** The source of conversations for this model. */
public Geary.App.ConversationMonitor monitor { get; private set; }
diff --git a/src/client/conversation-list/preview-loader.vala
b/src/client/conversation-list/preview-loader.vala
index 217a529..9b0a698 100644
--- a/src/client/conversation-list/preview-loader.vala
+++ b/src/client/conversation-list/preview-loader.vala
@@ -12,6 +12,16 @@
public class PreviewLoader : Geary.BaseObject {
+ /** Email fields required to load message previews. */
+ public const Geary.Email.Field REQUIRED_FIELDS =
+ ConversationListModel.REQUIRED_FIELDS |
+ Geary.Email.Field.PREVIEW |
+ // XXX Remove ALL and NONE below when PREVIEW has been
+ // fixed. See Bug 714317.
+ Geary.Email.Field.ALL | Geary.Email.Field.NONE;
+
+
+ /** Progress monitor for loading previews from the database. */
public Geary.ProgressMonitor progress {
get;
private set;
@@ -20,11 +30,6 @@ public class PreviewLoader : Geary.BaseObject {
);
}
- // XXX Remove ALL and NONE when PREVIEW has been fixed. See Bug 714317.
- private const Geary.Email.Field WITH_PREVIEW_FIELDS =
- Geary.Email.Field.ENVELOPE | Geary.Email.Field.FLAGS |
- Geary.Email.Field.PROPERTIES | Geary.Email.Field.PREVIEW |
- Geary.Email.Field.ALL | Geary.Email.Field.NONE;
private Geary.App.EmailStore email_store;
private Cancellable cancellable;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]