Merge pull request #11250 from osmandapp/Quick-action-fix

Quick action fix
This commit is contained in:
Vitaliy 2021-03-25 14:39:29 +02:00 committed by GitHub
commit a0be550d04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -222,15 +222,16 @@ public class CreateEditActionDialog extends DialogFragment
if (savedInstanceState == null) {
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());
nameEditText.setText(getString(R.string.ltr_or_rtl_combine_via_dash, actionName, name));
} else {
nameEditText.setText(name);
}
} else {
action.setName(nameEditText.getText().toString());
}
action.setName(nameEditText.getText().toString());
}
image.setImageResource(action.getIconRes(getApplication()));
}