[geary/wip/765516-gtk-widget-conversation-viewer: 179/207] Fix logic thinko with conversation last row handling.



commit 21593afe09bef63c8f5c00cd003e48fc14d4f4d0
Author: Michael James Gratton <mike vee net>
Date:   Mon Sep 12 17:48:24 2016 +1000

    Fix logic thinko with conversation last row handling.

 .../conversation-viewer/conversation-listbox.vala  |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-listbox.vala 
b/src/client/conversation-viewer/conversation-listbox.vala
index c74ee78..8b45c2d 100644
--- a/src/client/conversation-viewer/conversation-listbox.vala
+++ b/src/client/conversation-viewer/conversation-listbox.vala
@@ -226,13 +226,17 @@ public class ConversationListBox : Gtk.ListBox {
         }
 
         if (this.last_email_row != null && !this.cancellable.is_cancelled()) {
-            // The last row should always be expanded
+            // The last row should always be expanded, so expand it
+            // and start loading if needed.
             this.last_email_row.expand();
+            if (this.last_email_row != first_expanded_row) {
+                yield this.last_email_row.view.start_loading(this.cancellable);
+            }
+
+            // If no other row was expanded by default, use the last
+            // row.
             if (first_expanded_row == null) {
                 first_expanded_row = this.last_email_row;
-                yield this.last_email_row.view.start_loading(
-                    this.cancellable
-                );
             }
 
             // Ensure we scroll to the first expanded roll when it


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