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>
This commit is contained in:
parent
e49f08e35f
commit
7d2b0f579d
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue