[gnome-photos/wip/rishi/collection: 1/6] base-item: Use QUERY_FLAGS_UNFILTERED in base_item_refresh



commit f53befcde47576542efef89ca7d0cc10f5c8c358
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jul 27 17:00:50 2017 +0200

    base-item: Use QUERY_FLAGS_UNFILTERED in base_item_refresh
    
    The difference between QUERY_FLAGS_NONE and QUERY_FLAGS_UNFILTERED is
    that the former applies the default WHERE and FILTER clauses (ie.
    membership in the active collection, if any, and "all" for everything
    else), while the latter doesn't.
    
    Therefore, QUERY_FLAGS_NONE is appropriate for showing the contents of
    a collection, or to verify if a newly created URN is relevant to the
    application depending on the active collection, if any. However,
    base_item_refresh is used with items that are already known, so their
    relevance has already been established. In fact, QUERY_FLAGS_NONE
    might mistakenly filter them out because they don't belong to the
    active collection, even though they are still used by some other mode.

 src/photos-base-item.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 263f6b4..e94c507 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -3963,7 +3963,7 @@ photos_base_item_refresh (PhotosBaseItem *self)
   job = photos_single_item_job_new (priv->id);
   photos_single_item_job_run (job,
                               state,
-                              PHOTOS_QUERY_FLAGS_NONE,
+                              PHOTOS_QUERY_FLAGS_UNFILTERED,
                               NULL,
                               photos_base_item_refresh_executed,
                               g_object_ref (self));


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