Skip to content
Snippets Groups Projects
Commit 8ac64bc1 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#3854] Cleanup treeview on search returning no contacts

parent e63e0ff1
No related branches found
No related tags found
No related merge requests found
...@@ -47,11 +47,9 @@ ...@@ -47,11 +47,9 @@
*/ */
typedef struct _Search_Handler_And_Data { typedef struct _Search_Handler_And_Data {
SearchAsyncHandler search_handler; SearchAsyncHandler search_handler;
OpenAsyncHandler open_handler;
gpointer user_data; gpointer user_data;
GList *hits; GList *hits;
int max_results_remaining; int max_results_remaining;
int book_views_remaining;
EBookQuery *equery; EBookQuery *equery;
} Search_Handler_And_Data; } Search_Handler_And_Data;
...@@ -247,8 +245,11 @@ eds_query_result_cb (EBook *book, EBookStatus status, GList *contacts, gpointer ...@@ -247,8 +245,11 @@ eds_query_result_cb (EBook *book, EBookStatus status, GList *contacts, gpointer
DEBUG ("Addressbook: Search Result callback called"); DEBUG ("Addressbook: Search Result callback called");
Search_Handler_And_Data *had = (Search_Handler_And_Data *) user_data;
if (!contacts) { if (!contacts) {
DEBUG ("Addressbook: Error: Contact is NULL"); DEBUG ("Addressbook: No contact found");
had->search_handler (NULL, user_data);
return; return;
} }
...@@ -258,8 +259,6 @@ eds_query_result_cb (EBook *book, EBookStatus status, GList *contacts, gpointer ...@@ -258,8 +259,6 @@ eds_query_result_cb (EBook *book, EBookStatus status, GList *contacts, gpointer
gchar *number; gchar *number;
Search_Handler_And_Data *had = (Search_Handler_And_Data *) user_data;
// make sure we have a new list of hits // make sure we have a new list of hits
had->hits = NULL; had->hits = NULL;
...@@ -552,7 +551,6 @@ search_async_by_contacts (const char *query, int max_results, SearchAsyncHandler ...@@ -552,7 +551,6 @@ search_async_by_contacts (const char *query, int max_results, SearchAsyncHandler
had->user_data = user_data; had->user_data = user_data;
had->hits = NULL; had->hits = NULL;
had->max_results_remaining = max_results; had->max_results_remaining = max_results;
had->book_views_remaining = 0;
had->equery = create_query (query); had->equery = create_query (query);
if (!current_uri) if (!current_uri)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment