[geary/gnumdk/stable: 2/2] Add debug messages




commit 22d2936e1a204121e179e57411c96e4f138cf68a
Author: Cédric Bellegarde <cedric bellegarde adishatz org>
Date:   Wed Oct 19 23:40:41 2022 +0200

    Add debug messages

 src/client/conversation-viewer/conversation-email.vala    | 3 +++
 src/client/conversation-viewer/conversation-list-box.vala | 6 ++++++
 2 files changed, 9 insertions(+)
---
diff --git a/src/client/conversation-viewer/conversation-email.vala 
b/src/client/conversation-viewer/conversation-email.vala
index 17cf85c08..3514b3da2 100644
--- a/src/client/conversation-viewer/conversation-email.vala
+++ b/src/client/conversation-viewer/conversation-email.vala
@@ -933,14 +933,17 @@ public class ConversationEmail : Gtk.Box, Geary.BaseInterface {
     }
 
     private void on_content_loaded() {
+        stdout.printf("on content loaded(): %d -> %s\n", this.message_body_state, 
this.email.subject.to_string());
         bool all_loaded = true;
         foreach (ConversationMessage message in this) {
             if (!message.is_content_loaded) {
+                stdout.printf("false\n");
                 all_loaded = false;
                 break;
             }
         }
         if (all_loaded && this.message_body_state != COMPLETED) {
+            stdout.printf("completed\n");
             this.message_body_state = COMPLETED;
             this.message_bodies_loaded_lock.blind_notify();
 
diff --git a/src/client/conversation-viewer/conversation-list-box.vala 
b/src/client/conversation-viewer/conversation-list-box.vala
index 6688e2718..fa5114d19 100644
--- a/src/client/conversation-viewer/conversation-list-box.vala
+++ b/src/client/conversation-viewer/conversation-list-box.vala
@@ -1387,9 +1387,14 @@ public class ConversationListBox : Gtk.ListBox, Geary.BaseInterface {
         ConversationEmail? view = obj as ConversationEmail;
         if (view != null && view.message_body_state == COMPLETED) {
             if (!this.suppress_mark_timer) {
+                print("mark\n");
                 this.mark_read_timer.start();
             }
             this.suppress_mark_timer = false;
+        } else if (view == null) {
+            print("view is null: %s\n", view.email.subject.to_string());
+        } else {
+            print("message_body_state: %d ->  %s\n", view.message_body_state, 
view.email.subject.to_string());
         }
     }
 
@@ -1571,3 +1576,4 @@ public class ConversationListBox : Gtk.ListBox, Geary.BaseInterface {
     }
 
 }
+


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