[geary] Revert "Fix find_boundaries_async in search, imap-engine Folder impl's"
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Revert "Fix find_boundaries_async in search, imap-engine Folder impl's"
- Date: Tue, 10 Mar 2015 21:16:56 +0000 (UTC)
commit 5ba069e726ac4e7f87f3063657562df6face8e75
Author: Jim Nelson <jim yorba org>
Date: Tue Mar 10 14:13:06 2015 -0700
Revert "Fix find_boundaries_async in search, imap-engine Folder impl's"
This reverts commit 70bc00c623eb4e4e85254afe3b05f2795f239338.
Conflicts:
src/engine/api/geary-search-folder.vala
.../imap-engine/imap-engine-minimal-folder.vala | 39 +++++++-------------
1 files changed, 13 insertions(+), 26 deletions(-)
---
diff --git a/src/engine/imap-engine/imap-engine-minimal-folder.vala
b/src/engine/imap-engine/imap-engine-minimal-folder.vala
index 9759d9c..d146de6 100644
--- a/src/engine/imap-engine/imap-engine-minimal-folder.vala
+++ b/src/engine/imap-engine/imap-engine-minimal-folder.vala
@@ -1030,36 +1030,23 @@ private class Geary.ImapEngine.MinimalFolder : Geary.Folder, Geary.FolderSupport
low = null;
high = null;
- // Get paths for all email identifiers
Gee.MultiMap<Geary.EmailIdentifier, Geary.FolderPath>? map
= yield account.get_containing_folders_async(ids, cancellable);
- if (map == null || map.size == 0)
- return;
- // only deal with email identifiers in this folder
- Gee.ArrayList<Geary.EmailIdentifier> in_folder = new Gee.ArrayList<Geary.EmailIdentifier>();
- foreach (Geary.EmailIdentifier id in map.get_keys()) {
- if (path in map.get(id))
- in_folder.add(id);
+ if (map != null) {
+ Gee.ArrayList<Geary.EmailIdentifier> in_folder = new Gee.ArrayList<Geary.EmailIdentifier>();
+ foreach (Geary.EmailIdentifier id in map.get_keys()) {
+ if (path in map.get(id))
+ in_folder.add(id);
+ }
+
+ if (in_folder.size > 0) {
+ Gee.SortedSet<Geary.EmailIdentifier> sorted = Geary.EmailIdentifier.sort(in_folder);
+
+ low = sorted.first();
+ high = sorted.last();
+ }
}
-
- if (in_folder.size == 0)
- return;
-
- // get new Emails for these; they will have their UIDs and can be sorted properly
- Gee.List<Email>? list = yield local_folder.list_email_by_sparse_id_async(in_folder,
- Email.Field.NONE, ImapDB.Folder.ListFlags.NONE, cancellable);
- if (list == null || list.size == 0)
- return;
-
- Gee.HashSet<EmailIdentifier> db_ids = traverse<Email>(list)
- .map<EmailIdentifier>(email => email.id)
- .to_hash_set();
-
- Gee.SortedSet<Geary.EmailIdentifier> sorted = Geary.EmailIdentifier.sort(db_ids);
-
- low = sorted.first();
- high = sorted.last();
}
private void on_email_complete(Gee.Collection<Geary.EmailIdentifier> email_ids) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]