diff --git a/.gitignore b/.gitignore index 846a6b3..355f1d6 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ /.idea/navEditor.xml /.idea/assetWizardSettings.xml /.idea/copilot.* +/docs/plans +/docs/android .DS_Store /build /captures diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e78ad9f..1c4fa5d 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -43,6 +43,10 @@ + + allCards.sortedByDescending { it.useCount } } - val topCards = sortedCards.take(MAX_SHORTCUTS) - + val maxShortcuts = ShortcutManagerCompat.getMaxShortcutCountPerActivity(context) + val topCards = sortedCards.take(maxShortcuts) val newShortcutIds = topCards.map { cardShortcutId(it.cardId) }.toSet() + val existingShortcuts = ShortcutManagerCompat.getDynamicShortcuts(context) val staleIds = existingShortcuts.filter { it.id !in newShortcutIds }.map { it.id } if (staleIds.isNotEmpty()) ShortcutManagerCompat.removeDynamicShortcuts(context, staleIds) @@ -62,6 +62,11 @@ suspend fun updateShortcuts(context: Context) { .setLongLabel(card.storeName) .setIcon(icon) .setIntent(intent) + .addCapabilityBinding( + "actions.intent.OPEN_APP_FEATURE", + "feature.name", + listOf(card.storeName), + ) .build() ShortcutManagerCompat.pushDynamicShortcut(context, shortcut) diff --git a/app/src/main/res/xml/shortcuts.xml b/app/src/main/res/xml/shortcuts.xml new file mode 100644 index 0000000..1e2d78e --- /dev/null +++ b/app/src/main/res/xml/shortcuts.xml @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/version.properties b/version.properties index 142b8ba..26e1d32 100644 --- a/version.properties +++ b/version.properties @@ -1,2 +1,2 @@ -VERSION_CODE=67 +VERSION_CODE=68 VERSION_NAME=1.5.1-staging.3 \ No newline at end of file