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 @Override
public boolean onSuggestionClick(int position) { public boolean onSuggestionClick(int position) {
Cursor cursor = (Cursor) getSuggestionsAdapter().getItem(position); Cursor cursor = (Cursor) getSuggestionsAdapter().getItem(position);
setQuery(cursor.getString(1), true); long id = cursor.getInt(0);
return false; setQuery(cursor.getString(1), id != -1);
return (id == -1);
} }
}); });
} }