[geary/wip/765516-gtk-widget-conversation-viewer: 137/207] Don't	clobber avatar loads for second and subsequent convo loads.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [geary/wip/765516-gtk-widget-conversation-viewer: 137/207] Don't	clobber avatar loads for second and subsequent convo loads.
- Date: Tue,  4 Oct 2016 00:07:56 +0000 (UTC)
commit 425c60e0a1bf96a457954abb13dcf13cde84dac7
Author: Michael James Gratton <mike vee net>
Date:   Fri Aug 12 00:34:38 2016 +1000
    Don't clobber avatar loads for second and subsequent convo loads.
    
    * src/client/conversation-viewer/conversation-viewer.vala
      (ConversationViewer::load_conversations): Cancel existig loads before
      launching new avatar loads.
 .../conversation-viewer/conversation-viewer.vala   |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-viewer.vala 
b/src/client/conversation-viewer/conversation-viewer.vala
index 6f4a84f..cfc8cc3 100644
--- a/src/client/conversation-viewer/conversation-viewer.vala
+++ b/src/client/conversation-viewer/conversation-viewer.vala
@@ -245,6 +245,10 @@ public class ConversationViewer : Gtk.Stack {
             // during loading.
             this.conversation_added(new_list);
 
+            // Cancel existing avatar loads this before loading new
+            // convo since that will start loading more avatars
+            GearyApplication.instance.controller.avatar_session.flush_queue();
+
             bool loaded = false;
             try {
                 yield new_list.load_conversation();
@@ -291,7 +295,6 @@ public class ConversationViewer : Gtk.Stack {
     // Remove any existing conversation list, cancelling its loading
     private void remove_current_list() {
         if (this.current_list != null) {
-            GearyApplication.instance.controller.avatar_session.flush_queue();
             this.current_list.cancel_load();
             this.conversation_removed(this.current_list);
             this.current_list.destroy();
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]