[geary/wip/765516-gtk-widget-conversation-viewer: 88/91] Fix logic error when determining when to show the "show images" infobar.



commit e8fbddcd03237a967f55f58b314a787c392c8d72
Author: Michael James Gratton <mike vee net>
Date:   Tue Jul 26 16:31:56 2016 +1000

    Fix logic error when determining when to show the "show images" infobar.

 .../conversation-viewer/conversation-message.vala  |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-message.vala 
b/src/client/conversation-viewer/conversation-message.vala
index 7049cba..3e2caf4 100644
--- a/src/client/conversation-viewer/conversation-message.vala
+++ b/src/client/conversation-viewer/conversation-message.vala
@@ -348,13 +348,15 @@ public class ConversationMessage : Gtk.Box {
 
         body_text = clean_html_markup(body_text ?? "", message, out load_images);
         if (load_images) {
-            Geary.Contact contact =
-                contact_store.get_by_rfc822(message.get_primary_originator());
-            bool contact_load = contact != null && contact.always_load_remote_images();
-            if (contact_load || always_load_remote_images) {
-                load_images = true;
-            } else {
+            bool contact_load = false;
+            Geary.Contact contact = this.contact_store.get_by_rfc822(
+                message.get_primary_originator()
+            );
+            if (contact != null)
+                contact_load = contact.always_load_remote_images();
+            if (!contact_load && !this.always_load_remote_images) {
                 remote_images_infobar.show();
+                load_images = false;
             }
         }
 


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