[gnome-photos] item-manager: Don't restrict search results to the active collection



commit 709db364a5722a338906c84e769218b72cebc463
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Feb 2 21:06:33 2018 +0100

    item-manager: Don't restrict search results to the active collection
    
    Search is always global. Initiating a search while viewing a
    collection shouldn't restrict the search results to within items
    inside the active collection.

 src/photos-item-manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
index 10fc1fa3..629add94 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -546,7 +546,7 @@ photos_item_manager_get_where (PhotosBaseManager *mngr, gint flags)
 {
   PhotosItemManager *self = PHOTOS_ITEM_MANAGER (mngr);
 
-  if (self->active_collection == NULL)
+  if (self->active_collection == NULL || (flags & PHOTOS_QUERY_FLAGS_SEARCH) != 0)
     return g_strdup ("");
 
   return photos_base_item_get_where (self->active_collection);


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