Merge pull request #11282 from osmandapp/Quick-action-list

Quick action list fix for show/hide for editable items
This commit is contained in:
Vitaliy 2021-03-29 20:44:44 +03:00 committed by GitHub
commit 07ee3be474
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -593,7 +593,13 @@ public class QuickActionListFragment extends BaseOsmAndFragment
List<QuickAction> actions = getQuickActions();
int actionGlobalPosition = actions.indexOf(action);
int actionPosition = actionGlobalPosition % ITEMS_IN_GROUP + 1;
h.title.setText(action.getName(app));
String name = action.getName(app);
if (action.getActionNameRes() != 0 && !name.contains(getString(action.getActionNameRes()))) {
String prefAction = getString(action.getActionNameRes());
h.title.setText(getString(R.string.ltr_or_rtl_combine_via_dash, prefAction, action.getName(app)));
} else {
h.title.setText(name);
}
h.subTitle.setText(getResources().getString(R.string.quick_action_item_action, actionPosition));
h.icon.setImageDrawable(getContentIcon(action.getIconRes(app)));