From 9c587bbc6fd920e9f12ddffb074a426b1fa1bf65 Mon Sep 17 00:00:00 2001 From: Michael James Gratton Date: Thu, 11 Aug 2016 18:03:16 +1000 Subject: [PATCH] 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 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/client/conversation-viewer/conversation-listbox.vala b/src/client/conversation-viewer/conversation-listbox.vala index ff01094b..2a1e2bb0 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(); } }