[geary/wip/714317-hide-html-in-preview] Use preview synthesis when conversation list is refreshing previews.



commit c2f0f14830742e99632d855fdf1821611e379e9c
Author: Michael James Gratton <mike vee net>
Date:   Tue Dec 20 23:29:31 2016 +1100

    Use preview synthesis when conversation list is refreshing previews.
    
    Since currently, PREVIEW has some bad assumptions, we want to avoid using
    it. As a workaround, when listing messages with PREVIEW, include ALL so
    that HEADER and BODY are also retreived and the preview can synthesised,
    also NONE to ensure that after setting ALL, UIDs will be returned in the
    result.
    
    Bug 714317.
    
    * src/client/conversation-list/conversation-list-store.vala
      (ConversationListStore): Include ALL and NONE in WITH_PREVIEW_FIELDS.
    
    * src/client/conversation-viewer/conversation-list-box.vala
      (ConversationListBox): Remove PREVIEW from REQUIRED_FIELDS, it's no
      longer needed.

 .../conversation-list/conversation-list-store.vala |   10 ++++++----
 .../conversation-viewer/conversation-list-box.vala |    1 -
 2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/client/conversation-list/conversation-list-store.vala 
b/src/client/conversation-list/conversation-list-store.vala
index 8ba37b3..851713d 100644
--- a/src/client/conversation-list/conversation-list-store.vala
+++ b/src/client/conversation-list/conversation-list-store.vala
@@ -16,10 +16,12 @@
 public class ConversationListStore : Gtk.ListStore {
     public const Geary.Email.Field REQUIRED_FIELDS =
         Geary.Email.Field.ENVELOPE | Geary.Email.Field.FLAGS | Geary.Email.Field.PROPERTIES;
-    
-    public const Geary.Email.Field WITH_PREVIEW_FIELDS =
-        Geary.Email.Field.ENVELOPE | Geary.Email.Field.FLAGS | Geary.Email.Field.PROPERTIES | 
Geary.Email.Field.PREVIEW;
-    
+
+        // XXX Remove ALL and NONE when PREVIEW has been fixed. See Bug 714317.
+        public 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;
+
     public enum Column {
         CONVERSATION_DATA,
         CONVERSATION_OBJECT,
diff --git a/src/client/conversation-viewer/conversation-list-box.vala 
b/src/client/conversation-viewer/conversation-list-box.vala
index cf03c18..c89b882 100644
--- a/src/client/conversation-viewer/conversation-list-box.vala
+++ b/src/client/conversation-viewer/conversation-list-box.vala
@@ -29,7 +29,6 @@ public class ConversationListBox : Gtk.ListBox {
         | Geary.Email.Field.SUBJECT
         | Geary.Email.Field.DATE
         | Geary.Email.Field.FLAGS
-        | Geary.Email.Field.PREVIEW
         | Geary.ComposedEmail.REQUIRED_REPLY_FIELDS;
 
     // Offset from the top of the list box which emails views will


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]