From b2408eef042048a2f25fd680b8c2e8a130488892 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 19 Oct 2019 21:26:52 +0200 Subject: [PATCH] Sort tasks by done/undone first and then newest --- src/models/list.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/models/list.js b/src/models/list.js index 40470bff..5f90c451 100644 --- a/src/models/list.js +++ b/src/models/list.js @@ -48,6 +48,11 @@ export default class ListModel extends AbstractModel { return -1 if (a.done > b.done) return 1 + + if (a.id > b.id) + return -1 + if (a.id < b.id) + return 1 return 0 }) }