[geary/wip/765516-gtk-widget-conversation-viewer: 165/169] Fix logic thinko with conversation last row handling.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/765516-gtk-widget-conversation-viewer: 165/169] Fix logic thinko with conversation last row handling.
- Date: Mon, 12 Sep 2016 13:26:14 +0000 (UTC)
commit b848822cd7ccf1140861c713d7d517cf42ab552d
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]