Commit 547114f1 authored by Jim Nelson's avatar Jim Nelson

Conversation list loads too much mail when scrolling down: Closes #7279

Two problems: (a) determination for vector expansion was not accounting
for INCLUDING_ID flag properly, and (b) messages added to the interior of
the vector during normalization (can happen when the database has a
gap in the middle of the vector) were being treated as appended (i.e. new)
messages, causing the ConversationMonitor to load all of them.
parent c1a9d312
......@@ -367,6 +367,7 @@ public class Geary.App.ConversationMonitor : BaseObject {
folder.email_appended.disconnect(on_folder_email_appended);
folder.email_removed.disconnect(on_folder_email_removed);
folder.email_flags_changed.disconnect(on_folder_email_flags_changed);
folder.email_count_changed.disconnect(on_folder_email_count_changed);
folder.opened.disconnect(on_folder_opened);
folder.closed.disconnect(on_folder_closed);
folder.account.email_locally_complete.disconnect(on_account_email_locally_complete);
......
......@@ -317,7 +317,6 @@ private class Geary.ImapEngine.GenericFolder : Geary.AbstractFolder, Geary.Folde
if (replay_queue.query_local_writebehind_operation(ReplayOperation.WritebehindOperation.CREATE,
remote_email.id, null)) {
to_create_or_merge.add(remote_email);
appended_ids.add(remote_email.id);
Logging.debug(Logging.Flag.FOLDER_NORMALIZATION, "%s: appending inside remote ID %s",
to_string(), remote_email.id.to_string());
......
......@@ -43,11 +43,16 @@ private class Geary.ImapEngine.ListEmailByID : Geary.ImapEngine.AbstractListEmai
}
}
// verify that the initial_id was found; if not, then want to get it from the remote
// (this will force a vector expansion, if required)
if (initial_id != null && !initial_id_found) {
unfulfilled.set(required_fields | ImapDB.Folder.REQUIRED_FOR_DUPLICATE_DETECTION,
initial_id);
// If INCLUDING_ID specified, verify that the initial_id was found; if not, then want to
// get it from the remote (this will force a vector expansion, if required)
if (flags.is_including_id()) {
if (initial_id != null && !initial_id_found) {
unfulfilled.set(required_fields | ImapDB.Folder.REQUIRED_FOR_DUPLICATE_DETECTION,
initial_id);
}
} else {
// fake it, as this flag is used later to determine vector expansion
initial_id_found = true;
}
// report fulfilled items
......
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