Commit 3a120f11 authored by Michael Gratton's avatar Michael Gratton 🤞 Committed by Michael Gratton

Fix a few warnings when switching between folders quickly

parent d320d33b
Pipeline #57322 failed with stages
in 6 minutes and 38 seconds
......@@ -208,10 +208,13 @@ public class ConversationListStore : Gtk.ListStore {
try {
emails = yield email_store.list_email_by_sparse_id_async(emails_needing_previews,
ConversationListStore.WITH_PREVIEW_FIELDS, flags, cancellable);
} 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))
warning("Unable to fetch preview: %s", err.message);
} catch (GLib.IOError.CANCELLED err) {
// All good
} catch (Geary.EngineError.NOT_FOUND err) {
// All good also, as that's entirely possible when waiting
// for the remote to open
} catch (GLib.Error err) {
warning("Unable to fetch preview: %s", err.message);
}
return emails ?? new Gee.ArrayList<Geary.Email>();
......
......@@ -550,6 +550,8 @@ public class ConversationEmail : Gtk.Box, Geary.BaseInterface {
on_service_status_change
);
this.load_cancellable.cancelled.connect(on_load_cancelled);
this.body_loading_timeout = new Geary.TimeoutManager.milliseconds(
BODY_LOAD_TIMEOUT_MSEC, this.on_body_loading_timeout
);
......@@ -1014,6 +1016,10 @@ public class ConversationEmail : Gtk.Box, Geary.BaseInterface {
this.primary_message.show_loading_pane();
}
private void on_load_cancelled() {
this.body_loading_timeout.reset();
}
private void on_flag_remote_images(ConversationMessage view) {
// XXX check we aren't already auto loading the image
mark_email(Geary.EmailFlags.LOAD_REMOTE_IMAGES, null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment