[gnome-photos] item-manager: Remove from the 0th child if it doesn't exist anywhere



commit 4a72c1a50c3e87d00d87e8f69d0652d86c757545
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Sep 5 22:33:32 2016 +0200

    item-manager: Remove from the 0th child if it doesn't exist anywhere
    
    ... and not the other way round.
    
    We will re-introduce the assertion in the subsequent commit so that it
    is easier to read.
    
    Fallout from 8d1d00232a9e62deb93ae4d4f498d0b51b3dad2e
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770342

 src/photos-item-manager.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
index 09e089d..5286c48 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -862,15 +862,8 @@ photos_item_manager_clear (PhotosItemManager *self, PhotosWindowMode mode)
             break;
         }
 
-      if (item != NULL)
-        {
-          const gchar *id1;
-
-          id1 = photos_filterable_get_id (PHOTOS_FILTERABLE (item));
-          g_assert_cmpstr (id, ==, id1);
-
-          photos_base_manager_remove_object_by_id (self->item_mngr_chldrn[0], id);
-        }
+      if (item == NULL)
+        photos_base_manager_remove_object_by_id (self->item_mngr_chldrn[0], id);
     }
 
   photos_base_manager_clear (item_mngr_chld);


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