Remove deleted messages from search/filter results

This ensures that when moving/deleting messages with a filter active the
view gets updated properly.
This commit is contained in:
Andrew Jeffery 2020-07-09 08:46:45 +01:00 committed by Reto Brunner
parent 749dbb93a4
commit 6401b105cb
1 changed files with 9 additions and 0 deletions

View File

@ -248,6 +248,15 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
} }
} }
store.uids = uids store.uids = uids
var newResults []uint32
for _, res := range store.results {
if _, deleted := toDelete[res]; !deleted {
newResults = append(newResults, res)
}
}
store.results = newResults
update = true update = true
} }