1
0
mirror of https://github.com/djcb/mu.git synced 2024-06-25 07:28:02 +02:00

mu4e: tweak the contact sorting

Fall back to freq / tstamp when both contacts are personal.
This commit is contained in:
djcb 2016-01-03 15:53:07 +02:00
parent b373f8e5f0
commit 5e13d31450

View File

@ -674,6 +674,8 @@ frequency."
(tstamp2 (plist-get c2 :tstamp))) (tstamp2 (plist-get c2 :tstamp)))
;; personal contacts come first ;; personal contacts come first
(if (or personal1 personal2) (if (or personal1 personal2)
(if (not (and personal1 personal2))
;; if only one is personal, that one comes first
(if personal1 t nil) (if personal1 t nil)
;; then come recently seen ones; but only if they're not in ;; then come recently seen ones; but only if they're not in
;; the future (as seen in spams) ;; the future (as seen in spams)
@ -681,7 +683,7 @@ frequency."
(or (> tstamp1 recent) (> tstamp2 recent))) (or (> tstamp1 recent) (> tstamp2 recent)))
(> tstamp1 tstamp2) (> tstamp1 tstamp2)
;; otherwise, use the frequency ;; otherwise, use the frequency
(> freq1 freq2)))))))) (> freq1 freq2)))))))))
;; start and stopping ;; start and stopping
(defun mu4e~fill-contacts (contacts) (defun mu4e~fill-contacts (contacts)