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:
parent
749dbb93a4
commit
6401b105cb
1 changed files with 9 additions and 0 deletions
|
@ -248,6 +248,15 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
|
|||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue