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
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue