[gnome-todo] list-model-sort: More fixups



commit 52f6ae98cf5a7ef72164d9a65b9fdce4b8ee79d1
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Sep 12 20:04:33 2018 -0300

    list-model-sort: More fixups
    
     * Stop using -1u, use -1
     * Send the correct parameters to items-changed when
       removing items

 src/models/gtd-list-model-sort.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/models/gtd-list-model-sort.c b/src/models/gtd-list-model-sort.c
index 922a70f..dedbb6d 100644
--- a/src/models/gtd-list-model-sort.c
+++ b/src/models/gtd-list-model-sort.c
@@ -136,8 +136,8 @@ child_model_items_changed (GtdListModelSort *self,
   if (n_removed > 0)
     {
       GSequenceIter *iter;
-      gint64 previous_sort_position = -1u;
-      gint64 first_position = -1u;
+      gint64 previous_sort_position = -1;
+      gint64 first_position = -1;
       gint64 counter = 0;
 
       /* Small shortcut when all items are removed */
@@ -184,7 +184,7 @@ child_model_items_changed (GtdListModelSort *self,
            */
           if (previous_sort_position != -1 && sort_position != previous_sort_position + 1)
             {
-              emit_items_changed (self, first_position, 0, counter);
+              emit_items_changed (self, first_position, counter, 0);
 
               first_position = sort_position;
               counter = 0;


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