fix show comment/certificate buttons in group-by-file mode

This commit is contained in:
Zlatin Balevsky
2019-11-09 10:53:38 +00:00
parent 549457e36f
commit ac1068a681

View File

@@ -438,6 +438,17 @@ class SearchTabView {
if (lastResults2SortEvent != null)
selectedRow = resultsTable2.rowSorter.convertRowIndexToModel(selectedRow)
InfoHash infohash = model.results2[selectedRow]
Persona sender = selectedSender()
if (sender == null) // really shouldn't happen
return model.hashBucket[infohash].first()
for (UIResultEvent candidate : model.hashBucket[infohash]) {
if (candidate.sender == sender)
return candidate
}
// also shouldn't happen
return model.hashBucket[infohash].first()
} else {
int[] selectedRows = resultsTable.getSelectedRows()