Sort messages by date. Fixes #4

This commit is contained in:
Denis Zheleztsov 2018-06-26 11:49:22 +03:00
parent 9f5850bbb9
commit feb4da9f86
Signed by: Difrex
GPG Key ID: B047A0E62A285621

View File

@ -172,7 +172,8 @@ unread by default, but you can MARK-READ it."
(dolist (l (emacsql (open-echo-db echo)
[:select [id, tags, author, address, recipient, repto, echo, subj, body, time, unread]
:from messages
:order-by time]))
:order-by DATE\(time\)
:desc]))
(if (> (length l) 0)
(setq msgs (append msgs (make-list 1 (make-hash-from-msg-list l))))))
msgs))