show source in incoming searches

pull/4/head
Zlatin Balevsky 2019-06-03 07:43:28 +01:00
parent fad01603de
commit 9e0d52d548
2 changed files with 8 additions and 2 deletions

View File

@ -228,11 +228,16 @@ class MainFrameModel {
if (search.trim().size() == 0)
return
runInsideUIAsync {
searches.addFirst(search)
searches.addFirst(new IncomingSearch(search : search, replyTo : e.replyTo))
while(searches.size() > 200)
searches.removeLast()
JTable table = builder.getVariable("searches-table")
table.model.fireTableDataChanged()
}
}
class IncomingSearch {
String search
Destination replyTo
}
}

View File

@ -177,7 +177,8 @@ class MainFrameView {
scrollPane(constraints : BorderLayout.CENTER) {
table(id : "searches-table") {
tableModel(list : model.searches) {
closureColumn(header : "Keywords", type : String, read : { it })
closureColumn(header : "Keywords", type : String, read : { it.search })
closureColumn(header : "From", type : String, read : {it.replyTo.toBase32()})
}
}
}