[geary/wip/search-cleanup: 5/5] Make ImapDB.Account.get_search_matches_async greedy stripping consistent
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/search-cleanup: 5/5] Make ImapDB.Account.get_search_matches_async greedy stripping consistent
- Date: Mon, 4 Feb 2019 12:19:51 +0000 (UTC)
commit beccdd49dfe147ef897dcaf5de5d473a142d39fa
Author: Michael Gratton <mike vee net>
Date: Mon Feb 4 23:10:35 2019 +1100
Make ImapDB.Account.get_search_matches_async greedy stripping consistent
Only strips greey matches if implied by the search query, to make its
results consistent with ::search_async.
src/engine/imap-db/imap-db-account.vala | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/engine/imap-db/imap-db-account.vala b/src/engine/imap-db/imap-db-account.vala
index 56613066..f1f83650 100644
--- a/src/engine/imap-db/imap-db-account.vala
+++ b/src/engine/imap-db/imap-db-account.vala
@@ -1347,9 +1347,11 @@ private class Geary.ImapDB.Account : BaseObject {
do_get_search_matches(cx, query, id_map, cancellable);
if (match_map == null || match_map.size == 0)
return Db.TransactionOutcome.DONE;
-
- strip_greedy_results(query, match_map);
-
+
+ if (should_strip_greedy_results(query)) {
+ strip_greedy_results(query, ids, match_map);
+ }
+
search_matches = new Gee.HashSet<string>();
foreach (Gee.Set<string> matches in match_map.values)
search_matches.add_all(matches);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]