Merge pull request #11250 from osmandapp/Quick-action-fix
Quick action fix
This commit is contained in:
commit
a0be550d04
1 changed files with 4 additions and 3 deletions
|
@ -222,15 +222,16 @@ public class CreateEditActionDialog extends DialogFragment
|
||||||
|
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
String name = action.getName(getContext());
|
String name = action.getName(getContext());
|
||||||
if (action.getActionNameRes() != 0) {
|
if (!action.isActionEditable() && action.getActionNameRes() != 0
|
||||||
|
&& !name.contains(getString(action.getActionNameRes()))) {
|
||||||
String actionName = getString(action.getActionNameRes());
|
String actionName = getString(action.getActionNameRes());
|
||||||
nameEditText.setText(getString(R.string.ltr_or_rtl_combine_via_dash, actionName, name));
|
nameEditText.setText(getString(R.string.ltr_or_rtl_combine_via_dash, actionName, name));
|
||||||
} else {
|
} else {
|
||||||
nameEditText.setText(name);
|
nameEditText.setText(name);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
action.setName(nameEditText.getText().toString());
|
action.setName(nameEditText.getText().toString());
|
||||||
}
|
}
|
||||||
image.setImageResource(action.getIconRes(getApplication()));
|
image.setImageResource(action.getIconRes(getApplication()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue