parent
3e7ca15a26
commit
d906e35cae
1 changed files with 3 additions and 2 deletions
|
@ -374,14 +374,15 @@ public class QuickSearchPoiFilterFragment extends DialogFragment {
|
|||
builder.setPositiveButton(R.string.shared_string_save, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
PoiUIFilter nFilter = new PoiUIFilter(editText.getText().toString(), null, filter.getAcceptedTypes(), app);
|
||||
String filterName = editText.getText().toString();
|
||||
PoiUIFilter nFilter = new PoiUIFilter(filterName, null, filter.getAcceptedTypes(), app);
|
||||
applyFilterFields();
|
||||
if (!Algorithms.isEmpty(filter.getFilterByName())) {
|
||||
nFilter.setSavedFilterByName(filter.getFilterByName());
|
||||
}
|
||||
if (app.getPoiFilters().createPoiFilter(nFilter, false)) {
|
||||
Toast.makeText(getContext(),
|
||||
getContext().getText(R.string.edit_filter_create_message, editText.getText().toString()),
|
||||
getContext().getString(R.string.edit_filter_create_message, filterName),
|
||||
Toast.LENGTH_SHORT).show();
|
||||
app.getSearchUICore().refreshCustomPoiFilters();
|
||||
((QuickSearchDialogFragment) getParentFragment()).replaceQueryWithUiFilter(nFilter, "");
|
||||
|
|
Loading…
Reference in a new issue