Trim favorite name
This commit is contained in:
parent
4b5cf87d34
commit
5feaaa8485
2 changed files with 3 additions and 3 deletions
|
@ -241,7 +241,7 @@ public class FavouritesActivity extends OsmandExpandableListActivity {
|
|||
builder.setPositiveButton(R.string.default_buttons_apply, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
boolean editied = helper.editFavouriteName(point, editText.getText().toString(), cat.getText().toString());
|
||||
boolean editied = helper.editFavouriteName(point, editText.getText().toString().trim(), cat.getText().toString());
|
||||
if (editied) {
|
||||
favouritesAdapter.synchronizeGroups();
|
||||
favouritesAdapter.sort(favoritesComparator);
|
||||
|
|
|
@ -180,8 +180,8 @@ public class MapActivityActions implements DialogProvider {
|
|||
public void onClick(DialogInterface dialog, int which) {
|
||||
FavouritePoint point = (FavouritePoint) args.getSerializable(KEY_FAVORITE);
|
||||
final FavouritesDbHelper helper = ((OsmandApplication) activity.getApplication()).getFavorites();
|
||||
point.setName(editText.getText().toString());
|
||||
point.setCategory(cat.getText().toString());
|
||||
point.setName(editText.getText().toString().trim());
|
||||
point.setCategory(cat.getText().toString().trim());
|
||||
boolean added = helper.addFavourite(point);
|
||||
if (added) {
|
||||
AccessibleToast.makeText(activity, MessageFormat.format(
|
||||
|
|
Loading…
Reference in a new issue