[geary/mjog/invert-folder-class-hierarchy: 60/72] ConversationListStore: Handle incomplete email errors loading previews
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/invert-folder-class-hierarchy: 60/72] ConversationListStore: Handle incomplete email errors loading previews
- Date: Wed, 3 Mar 2021 11:52:48 +0000 (UTC)
commit ff01056dbaeb1e595dd1d84023cc69bbef781b7a
Author: Michael Gratton <mike vee net>
Date: Sun Feb 28 19:53:03 2021 +1100
ConversationListStore: Handle incomplete email errors loading previews
Allow partial email to be loaded, remove any from the results that
don't satisfy preview fields.
src/client/conversation-list/conversation-list-store.vala | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/client/conversation-list/conversation-list-store.vala
b/src/client/conversation-list/conversation-list-store.vala
index 3014b1d7d..b7135d4bc 100644
--- a/src/client/conversation-list/conversation-list-store.vala
+++ b/src/client/conversation-list/conversation-list-store.vala
@@ -201,11 +201,14 @@ public class ConversationListStore : Gtk.ListStore {
Gee.Collection<Geary.Email>? emails = null;
try {
emails = yield email_store.get_multiple_email_by_id(
- emails_needing_previews,
+ ids,
WITH_PREVIEW_FIELDS,
- NONE,
+ INCLUDING_PARTIAL,
cancellable
);
+ emails = Geary.traverse(emails).filter(
+ e => WITH_PREVIEW_FIELDS in e.fields
+ ).to_linked_list();
} catch (GLib.IOError.CANCELLED err) {
// All good
} catch (Geary.EngineError.NOT_FOUND err) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]