aboutsummaryrefslogtreecommitdiffstats
path: root/lib/msgstore.go
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2022-03-19 21:51:05 +0100
committerRobin Jarry <robin@jarry.cc>2022-03-20 10:00:23 +0100
commit7d2b0f579dd307fe541401efcf79d318367ad5e2 (patch)
tree6e3b9067a2b7df85bc4371e3075ada22a76be2ca /lib/msgstore.go
parente49f08e35fa7d7439de1df7f362c69ed188358dc (diff)
downloadaerc-7d2b0f579dd307fe541401efcf79d318367ad5e2.tar.gz
store: fix deleting messages in filter mode
fix deleting messages when in filter mode. Link: https://lists.sr.ht/~rjarry/aerc-devel/%3CCIO3IVSM2JUB.3L46NM6LJZ2KB%40Archetype%3E Reported-by: Moritz Poldrack <git@moritz.sh> Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib/msgstore.go')
-rw-r--r--lib/msgstore.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index ddc2d562..817a7b32 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -290,6 +290,14 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
}
store.results = newResults
+ var newFiltered []uint32
+ for _, res := range store.filtered {
+ if _, deleted := toDelete[res]; !deleted {
+ newFiltered = append(newFiltered, res)
+ }
+ }
+ store.filtered = newFiltered
+
for _, thread := range store.Threads {
thread.Walk(func(t *types.Thread, _ int, _ error) error {
if _, deleted := toDelete[t.Uid]; deleted {