[geary/gnumdk/stable: 1/21] client: match substrings while autocompleting contacts. Fix #1144. Fix #984.




commit 0877061f1a4819daee3bca3f57471d6d0f6e6bfd
Author: Cédric Bellegarde <cedric bellegarde adishatz org>
Date:   Fri Sep 3 11:39:09 2021 +0200

    client: match substrings while autocompleting contacts. Fix #1144. Fix #984.

 src/client/application/application-contact-store.vala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/client/application/application-contact-store.vala 
b/src/client/application/application-contact-store.vala
index bf9916491..67e5dd339 100644
--- a/src/client/application/application-contact-store.vala
+++ b/src/client/application/application-contact-store.vala
@@ -116,7 +116,7 @@ public class Application.ContactStore : Geary.BaseObject {
 
         Folks.SearchView view = new Folks.SearchView(
             this.individuals,
-            new Folks.SimpleQuery(query, FOLKS_GENERAL_MATCH_FIELDS)
+            new Folks.SimpleQuery("%".concat(query, "%"), FOLKS_GENERAL_MATCH_FIELDS)
         );
         yield view.prepare();
 
@@ -158,7 +158,7 @@ public class Application.ContactStore : Geary.BaseObject {
 
         Gee.Collection<Geary.Contact> engine_results =
             yield this.account.contact_store.search(
-                query, min_importance, limit, cancellable
+                "%".concat(query, "%"), min_importance, limit, cancellable
             );
         foreach (Geary.Contact contact in engine_results) {
             string email_key = to_cache_key(contact.email);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]