From 303958f2b278d12acf85eea5ed0b466b8ec5aee3 Mon Sep 17 00:00:00 2001 From: Seb3thehacker Date: Mon, 2 Nov 2026 17:16:37 -0800 Subject: [PATCH] AntennaPod's Next chapter takes the second button slot, where it shows The player shows an app's first two buttons, and AntennaPod's are Rewind and Fast-forward, so the new button never appeared. --- .../main/java/app/seb3thehacker/gearslip/media/CarMedia.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gearslip/src/main/java/app/seb3thehacker/gearslip/media/CarMedia.kt b/gearslip/src/main/java/app/seb3thehacker/gearslip/media/CarMedia.kt index a4d7881..4941532 100644 --- a/gearslip/src/main/java/app/seb3thehacker/gearslip/media/CarMedia.kt +++ b/gearslip/src/main/java/app/seb3thehacker/gearslip/media/CarMedia.kt @@ -415,7 +415,10 @@ class CarMedia(private val context: Context) { if (controller?.packageName != ANTENNAPOD) return actions if (actions.any { it.id in ANTENNAPOD_NEXT_CHAPTER }) return actions val icon = resourcesOf(ANTENNAPOD)?.getIdentifier("ic_notification_next_chapter", "drawable", ANTENNAPOD) ?: 0 - return actions + CustomAction(ANTENNAPOD_NEXT_CHAPTER.first(), context.getString(R.string.player_next_chapter), null, icon) + val nextChapter = CustomAction(ANTENNAPOD_NEXT_CHAPTER.first(), context.getString(R.string.player_next_chapter), null, icon) + // The player shows only the first two of an app's own buttons, and AntennaPod's are + // Rewind and Fast-forward: second place keeps Rewind beside it. + return actions.toMutableList().apply { add(minOf(1, size), nextChapter) } } private fun resourcesOf(pkg: String): android.content.res.Resources? {