mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-07-26 14:38:39 +02:00
[PR #1205] [MERGED] Fix bug iOS AudioPlayer where multiple calls to setupRemoteTransportC… #1517
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/advplyr/audiobookshelf-app/pull/1205
Author: @indiefan
Created: 5/17/2024
Status: ✅ Merged
Merged: 5/18/2024
Merged by: @advplyr
Base:
master← Head:command-target-duplication-fix📝 Commits (1)
984f01dFix bug iOS AudioPlayer where multiple calls to setupRemoteTransportControls resulted in duplicate MPRemoteCommand targets being applied for the same action.📊 Changes
1 file changed (+9 additions, -0 deletions)
View changed files
📝
ios/App/Shared/player/AudioPlayer.swift(+9 -0)📄 Description
…ontrols resulted in duplicate MPRemoteCommand targets being applied for the same action.
We call this multiple times to pick up settings changes for certain playback controls. This makes that safe, with the assumption that we don't actually ever want multiple targets defined on the same commandCenter action. If at some point we do want that, then we'll need to refactor this to do more state-management, but I figured it was better to start with the simple approach unless/until we need the more complex one.
Fixes #1141.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.