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.
This commit is contained in:
Michael James Gratton 2016-08-11 18:03:16 +10:00
parent 5ea4b0a051
commit 9c587bbc6f

View file

@ -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();
}
}