[calls/gnome-41] contact-box: Do not hardcode length of match_fields[]



commit 6c4d4331917e0f69606a7d2a4cfdcde30c5aea01
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date:   Tue Sep 21 15:23:47 2021 +0200

    contact-box: Do not hardcode length of match_fields[]
    
    (cherry picked from commit d936a4572d15220f341ed2ced5f4bd0f19c58fa2)

 src/calls-contacts-box.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/calls-contacts-box.c b/src/calls-contacts-box.c
index e6429cae..f4b6865f 100644
--- a/src/calls-contacts-box.c
+++ b/src/calls-contacts-box.c
@@ -166,7 +166,7 @@ calls_contacts_box_init (CallsContactsBox *self)
 
   gtk_widget_init_template (GTK_WIDGET (self));
 
-  self->search_query = folks_simple_query_new ("", query_fields, 5);
+  self->search_query = folks_simple_query_new ("", query_fields, G_N_ELEMENTS (query_fields));
 
   gtk_list_box_set_header_func (GTK_LIST_BOX (self->contacts_listbox),
                                 (GtkListBoxUpdateHeaderFunc) header_cb,


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