aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2022-03-24 23:12:15 +0100
committerRobin Jarry <robin@jarry.cc>2022-03-25 13:07:22 +0100
commit20218de913d871390a97aa3b86a03d5d06af50d6 (patch)
tree808e023a469b149bada2524209a5e3e1b6e1f3db /lib
parente50ab5928475ef44e880e3391e5ca164c8077ce4 (diff)
downloadaerc-20218de913d871390a97aa3b86a03d5d06af50d6.tar.gz
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/msgstore.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index 542f93de..a29aad4f 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