Skip to content

Commit

Permalink
fix-scheduled-list-sort (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
marbetschar committed Jul 29, 2021
1 parent 5301363 commit 8c3a91b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Widgets/ListView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,11 @@ public class Tasks.Widgets.ListView : Gtk.Grid {
var row_b = (Tasks.Widgets.TaskRow) row2;

if (row_a.completed == row_b.completed) {
if (is_gtasks) {
if (source == null && row_a.task.get_due () != null && row_b.task.get_due () != null) {
// we are displaying the scheduled list, so we use the due date for sorting
return row_a.task.get_due ().get_value ().compare (row_b.task.get_due ().get_value ());

} else if (is_gtasks) {
var gtask_position_a = Util.get_gtasks_position_property_value (row_a.task);
var gtask_position_b = Util.get_gtasks_position_property_value (row_b.task);

Expand Down

0 comments on commit 8c3a91b

Please sign in to comment.