[geary/wip/search-cleanup: 9/9] Reduce verbosity of ConversationListStore debug spew
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/search-cleanup: 9/9] Reduce verbosity of ConversationListStore debug spew
- Date: Mon, 4 Feb 2019 12:15:13 +0000 (UTC)
commit c4ac5630d88873880b580feeb145fed24300d8f0
Author: Michael Gratton <mike vee net>
Date: Mon Feb 4 23:13:34 2019 +1100
Reduce verbosity of ConversationListStore debug spew
src/client/conversation-list/conversation-list-store.vala | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/client/conversation-list/conversation-list-store.vala
b/src/client/conversation-list/conversation-list-store.vala
index 1ef3fa09..64c22f1e 100644
--- a/src/client/conversation-list/conversation-list-store.vala
+++ b/src/client/conversation-list/conversation-list-store.vala
@@ -188,18 +188,17 @@ public class ConversationListStore : Gtk.ListStore {
emails.add_all(yield do_get_previews_async(needing_previews));
if (emails.size < 1)
return;
-
- debug("Displaying %d previews for %s...", emails.size, conversation_monitor.base_folder.to_string());
+
foreach (Geary.Email email in emails) {
Geary.App.Conversation? conversation = conversation_monitor.get_by_email_identifier(email.id);
- if (conversation != null)
+ // May be null if the conversation was removed between
+ // this call being invoked and it getting to this point
+ if (conversation != null) {
set_preview_for_conversation(conversation, email);
- else
- debug("Couldn't find conversation for %s", email.id.to_string());
+ }
}
- debug("Displayed %d previews for %s", emails.size, conversation_monitor.base_folder.to_string());
}
-
+
private async Gee.Collection<Geary.Email> do_get_previews_async(
Gee.Collection<Geary.EmailIdentifier> emails_needing_previews) {
Geary.Folder.ListFlags flags = (loading_local_only) ? Geary.Folder.ListFlags.LOCAL_ONLY
@@ -209,7 +208,6 @@ public class ConversationListStore : Gtk.ListStore {
debug("Loading %d previews...", emails_needing_previews.size);
emails = yield email_store.list_email_by_sparse_id_async(emails_needing_previews,
ConversationListStore.WITH_PREVIEW_FIELDS, flags, cancellable);
- debug("Loaded %d previews...", emails_needing_previews.size);
} catch (Error err) {
// Ignore NOT_FOUND, as that's entirely possible when waiting for the remote to open
if (!(err is Geary.EngineError.NOT_FOUND))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]