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



commit 9113781d90caf45f2107112aa13568f1823f9a7f
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://bugzilla.gnome.org/show_bug.cgi?id=751212

 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]