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



commit f113554f26a7b19e7a2acb491bffb5659dddd538
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 bbbfd89a..0d84131e 100644
--- a/src/photos-base-manager.c
+++ b/src/photos-base-manager.c
@@ -615,18 +615,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]