From d2f92473b3d8e68aad8a7f3d3b3c6c194446713c Mon Sep 17 00:00:00 2001 From: Vitaly Ovchinnikov Date: Fri, 22 Sep 2023 20:59:29 +0000 Subject: sort: new `flagged` sorting criteria Add new `flagged` criteria to `:sort` command (and apparently to the `sort` config option). Good for moving important stuff up. Signed-off-by: Vitaly Ovchinnikov Reviewed-by: Koni Marti Acked-by: Robin Jarry --- worker/lib/sort.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'worker/lib') diff --git a/worker/lib/sort.go b/worker/lib/sort.go index 2828999c..7af2c6fa 100644 --- a/worker/lib/sort.go +++ b/worker/lib/sort.go @@ -36,6 +36,8 @@ func Sort(messageInfos []*models.MessageInfo, }) case types.SortRead: sortFlags(messageInfos, criterion, models.SeenFlag) + case types.SortFlagged: + sortFlags(messageInfos, criterion, models.FlaggedFlag) case types.SortSize: sortSlice(criterion, messageInfos, func(i, j int) bool { return messageInfos[i].Size < messageInfos[j].Size -- cgit