fix filtering of results

dbus-notify
Zlatin Balevsky 2022-08-09 11:23:47 +01:00
parent 498c79b76d
commit 44a800435e
No known key found for this signature in database
GPG Key ID: A72832072D525E41
1 changed files with 6 additions and 6 deletions

View File

@ -168,13 +168,13 @@ class SearchTabModel {
view.addResultToDetailMaps(event)
}
results2.clear()
synchronized (allResults2) {
allResults2.addAll(copy)
if (filter == null)
results2.addAll(allResults2)
else
allResults2.stream().filter({ InfoHash ih -> filter(ih) }).forEach({ results2.add it })
for (UIResultEvent event : copy) {
InfoHash ih = event.getInfohash()
allResults2.add ih
if (filter(ih))
results2.add(ih)
}
}
view.addPendingResults()
view.updateResultsTable2()