Allow editing last search

refs #160
This commit is contained in:
M66B 2019-08-13 13:47:57 +02:00
parent 7fff466e17
commit fb3eb4f909
1 changed files with 3 additions and 2 deletions

View File

@ -129,8 +129,9 @@ public class SearchViewEx extends SearchView {
@Override
public boolean onSuggestionClick(int position) {
Cursor cursor = (Cursor) getSuggestionsAdapter().getItem(position);
setQuery(cursor.getString(1), true);
return false;
long id = cursor.getInt(0);
setQuery(cursor.getString(1), id != -1);
return (id == -1);
}
});
}