[gnome-todo] task: Compare task positions first and foremost



commit 3e868383e4ddeb8b1df10d55f0abe6eaebb94387
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Feb 7 08:29:26 2019 -0200

    task: Compare task positions first and foremost

 src/gtd-task.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/gtd-task.c b/src/gtd-task.c
index 1c407ad..c79486d 100644
--- a/src/gtd-task.c
+++ b/src/gtd-task.c
@@ -1201,14 +1201,6 @@ gtd_task_compare (GtdTask *t1,
   if (!t2)
     return -1;
 
-  /*
-   * Zero, compare by subtask hierarchy
-   */
-  retval = compare_by_subtasks (&t1, &t2);
-
-  if (retval != 0)
-    return retval;
-
   /*
    * The custom position overrides any comparison we can make. To keep compatibility,
    * for now, we only compare by position if both tasks have a custom position set.
@@ -1221,6 +1213,14 @@ gtd_task_compare (GtdTask *t1,
         return retval;
     }
 
+  /*
+   * Zero, compare by subtask hierarchy
+   */
+  retval = compare_by_subtasks (&t1, &t2);
+
+  if (retval != 0)
+    return retval;
+
   /*
    * Second, compare by ::due-date.
    */


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