Auto-choose first search row in PeerListBox.

This commit is contained in:
John Preston 2017-12-08 13:30:30 +04:00
parent aa16bcd604
commit c79d16a0d6

View file

@ -1362,8 +1362,12 @@ void PeerListContent::setSearchQuery(
}
void PeerListContent::submitted() {
if (auto row = getRow(_selected.index)) {
if (const auto row = getRow(_selected.index)) {
_controller->rowClicked(row);
} else if (showingSearch()) {
if (const auto row = getRow(RowIndex(0))) {
_controller->rowClicked(row);
}
}
}