EvanBacon / expo-quick-actions

Add home screen quick actions / shortcuts to your React Native app
MIT License
281 stars 7 forks source link

Duplicated actions #18

Open BrodaNoel opened 3 months ago

BrodaNoel commented 3 months ago

On my app.json, I have this:

[
        "expo-quick-actions",
        {
          "androidIcons": {
            "help_icon": {
              "foregroundImage": "src/styles/imgs/android-adaptive-foreground.png",
              "backgroundColor": "#000000"
            }
          },
          "iosActions": [
            {
              "title": "Wait! Do not delete me!",
              "subtitle": "Tell me what happened",
              "icon": "symbol:person.crop.circle.badge.questionmark",
              "id": "action-0",
              "params": {
                "href": "/about-to-remove"
              }
            }
          ]
        }
      ]

Then, in the App.js, I have this:

QuickActions.setItems([
        {
          title: i18n.t("Wait! Don't delete me!"),
          subtitle: i18n.t('Tell me what happened'),
          icon:
            Platform.OS === 'ios' ? 'symbol:person.crop.circle.badge.questionmark' : 'help_icon',
          id: 'action-0',
          params: { href: '/about-to-remove' },
        },
      ])

Problem is that, in my case (phone in Spanish), it will add a second action, in spanish, and it won't override the action id: action-0.

Seems like it's ignoring the id

image