From 20218de913d871390a97aa3b86a03d5d06af50d6 Mon Sep 17 00:00:00 2001 From: Koni Marti Date: Thu, 24 Mar 2022 23:12:15 +0100 Subject: [PATCH] store: sort messages even when a filter is applied Sort the message list even when a filter is applied according to the sort criteria given by the sort command. Currently, the sort command has no effect when a filter is in use. Signed-off-by: Koni Marti Acked-by: Robin Jarry --- lib/msgstore.go | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/msgstore.go b/lib/msgstore.go index 542f93d..a29aad4 100644 --- a/lib/msgstore.go +++ b/lib/msgstore.go @@ -198,6 +198,7 @@ func (store *MessageStore) Update(msg types.WorkerMessage) { } store.Messages = newMap store.uids = msg.Uids + sort.SortBy(store.filtered, store.uids) update = true case *types.DirectoryThreaded: var uids []uint32