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 <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Koni Marti 2022-03-24 23:12:15 +01:00 committed by Robin Jarry
parent e50ab59284
commit 20218de913
1 changed files with 1 additions and 0 deletions

View File

@ -198,6 +198,7 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
} }
store.Messages = newMap store.Messages = newMap
store.uids = msg.Uids store.uids = msg.Uids
sort.SortBy(store.filtered, store.uids)
update = true update = true
case *types.DirectoryThreaded: case *types.DirectoryThreaded:
var uids []uint32 var uids []uint32