[geary/wip/search-cleanup: 8/9] Make ImapDB.Account.get_search_matches_async greedy stripping consistent



commit 0d385a0b572f72d0fd56bf619dcf166a2c0af590
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]