From d906e35caed6d5b727832b23bd36b94b80adfaad Mon Sep 17 00:00:00 2001 From: vshcherb Date: Thu, 16 Apr 2020 18:32:49 +0200 Subject: [PATCH] Update QuickSearchPoiFilterFragment.java Fix #8795 --- .../net/osmand/plus/search/QuickSearchPoiFilterFragment.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchPoiFilterFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchPoiFilterFragment.java index 15dff040d2..1170e2c616 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchPoiFilterFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchPoiFilterFragment.java @@ -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, "");