mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-11 00:12:24 +01:00
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.
This commit is contained in:
1 parent
253cc5cad5
commit
303958f2b2
1 file changed
+4
-1
@@ -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? {
|
||||
|
||||
Reference in new issue
Block a user