[geary/wip/765516-gtk-widget-conversation-viewer: 109/174] Always allow last messages in a convo to be expanded.



commit dd47535e806d1d4f59e232f0c01a9e4516de5d0b
Author: Michael James Gratton <mike vee net>
Date:   Thu Aug 11 18:03:16 2016 +1000

    Always allow last messages in a convo to be expanded.
    
    Sent messages will be appended last to a convo when they get synced, so
    they should be able to be expanded.

 .../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 ff01094..2a1e2bb 100644
--- a/src/client/conversation-viewer/conversation-listbox.vala
+++ b/src/client/conversation-viewer/conversation-listbox.vala
@@ -718,12 +718,16 @@ public class ConversationListBox : Gtk.ListBox {
 
     private void on_row_activated(Gtk.ListBoxRow widget) {
         EmailRow row = (EmailRow) widget;
-        if (!row.is_last) {
-            if (row.is_expanded && row.view.composer == null) {
+        // Allow non-last rows to be expanded/collapsed, but also let
+        // the last row to be expanded since appended sent emails will
+        // be appended last. Finally, don't let rows with active
+        // composers be collapsed.
+        if (row.is_expanded) {
+            if (!row.is_last && row.view.composer == null) {
                 row.collapse();
-            } else {
-                row.expand();
             }
+        } else {
+            row.expand();
         }
     }
 


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