[gnome-photos/wip/rishi/collection: 17/46] base-manager: Shuffle some code around



commit 84153c5c56861bed294535a36ec5ee6c30ff6e6f
Author: Debarshi Ray <debarshir gnome org>
Date:   Sun Jan 21 19:34:02 2018 +0100

    base-manager: Shuffle some code around
    
    This will make the subsequent commit easier to read.
    
    https://gitlab.gnome.org/GNOME/gnome-photos/issues/29

 src/photos-base-manager.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/src/photos-base-manager.c b/src/photos-base-manager.c
index 06c8bf09..f437681f 100644
--- a/src/photos-base-manager.c
+++ b/src/photos-base-manager.c
@@ -620,18 +620,18 @@ photos_base_manager_get_all_filter (PhotosBaseManager *self)
   g_hash_table_iter_init (&iter, priv->objects);
   while (g_hash_table_iter_next (&iter, (gpointer *) &id, (gpointer *) &object_data))
     {
-      if (g_strcmp0 (id, "all") != 0)
+      gchar *str;
+
+      if (g_strcmp0 (id, "all") == 0)
+        continue;
+
+      str = photos_filterable_get_filter (PHOTOS_FILTERABLE (object_data->object));
+      if (g_strcmp0 (str, blank) == 0)
+        g_free (str);
+      else
         {
-          gchar *str;
-
-          str = photos_filterable_get_filter (PHOTOS_FILTERABLE (object_data->object));
-          if (g_strcmp0 (str, blank) == 0)
-            g_free (str);
-          else
-            {
-              strv[i] = str;
-              i++;
-            }
+          strv[i] = str;
+          i++;
         }
     }
 


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