mirror of https://github.com/djcb/mu.git
mu4e-headers: sort threaded headers by date
In "threaded-mode", we only sort by date; reflect this in the UI.
This commit is contained in:
parent
98abcf8e84
commit
9367a4dd95
|
@ -1073,18 +1073,20 @@ after the end of the search results."
|
||||||
(+ mu4e~mark-fringe-len (floor (fringe-columns 'left t))) ?\s)
|
(+ mu4e~mark-fringe-len (floor (fringe-columns 'left t))) ?\s)
|
||||||
(mapcar
|
(mapcar
|
||||||
(lambda (item)
|
(lambda (item)
|
||||||
(let* ((field (car item)) (width (cdr item))
|
(let* ( ;; with threading enabled, we're necessarily sorting by date.
|
||||||
|
(sort-field (if mu4e-headers-show-threads :date mu4e-headers-sort-field))
|
||||||
|
(field (car item)) (width (cdr item))
|
||||||
(info (cdr (assoc field
|
(info (cdr (assoc field
|
||||||
(append mu4e-header-info mu4e-header-info-custom))))
|
(append mu4e-header-info mu4e-header-info-custom))))
|
||||||
(require-full (plist-get info :require-full))
|
(require-full (plist-get info :require-full))
|
||||||
(sortable (plist-get info :sortable))
|
(sortable (plist-get info :sortable))
|
||||||
;; if sortable, it is either t (when field is sortable itself)
|
;; if sortable, it is either t (when field is sortable itself)
|
||||||
;; or a symbol (if another field is used for sorting)
|
;; or a symbol (if another field is used for sorting)
|
||||||
(sortfield (when sortable (if (booleanp sortable) field sortable)))
|
(this-field (when sortable (if (booleanp sortable) field sortable)))
|
||||||
(help (plist-get info :help))
|
(help (plist-get info :help))
|
||||||
;; triangle to mark the sorted-by column
|
;; triangle to mark the sorted-by column
|
||||||
(arrow
|
(arrow
|
||||||
(when (and sortable (eq sortfield mu4e-headers-sort-field))
|
(when (and sortable (eq this-field sort-field))
|
||||||
(if (eq mu4e-headers-sort-direction 'descending) downarrow uparrow)))
|
(if (eq mu4e-headers-sort-direction 'descending) downarrow uparrow)))
|
||||||
(name (concat (plist-get info :shortname) arrow))
|
(name (concat (plist-get info :shortname) arrow))
|
||||||
(map (make-sparse-keymap)))
|
(map (make-sparse-keymap)))
|
||||||
|
|
Loading…
Reference in New Issue