mirror of
https://github.com/yattee/yattee.git
synced 2026-02-20 01:39:46 +00:00
Fix lock screen always showing 10s seek regardless of system controls setting
This commit is contained in:
@@ -2062,8 +2062,11 @@ final class PlayerService {
|
||||
|
||||
/// Reconfigures system control buttons (Control Center, Lock Screen) based on current settings.
|
||||
/// Call this when system controls settings change.
|
||||
func reconfigureSystemControls() {
|
||||
nowPlayingService.configureRemoteCommands()
|
||||
func reconfigureSystemControls(
|
||||
mode: SystemControlsMode? = nil,
|
||||
duration: SystemControlsSeekDuration? = nil
|
||||
) {
|
||||
nowPlayingService.configureRemoteCommands(mode: mode, duration: duration)
|
||||
}
|
||||
|
||||
/// Observer for preset changes to reconfigure system controls.
|
||||
@@ -2074,6 +2077,9 @@ final class PlayerService {
|
||||
self.playerControlsLayoutService = service
|
||||
nowPlayingService.playerControlsLayoutService = service
|
||||
|
||||
// Reconfigure with the actual saved settings now that layout service is available
|
||||
nowPlayingService.configureRemoteCommands()
|
||||
|
||||
// Observe preset changes to reconfigure system controls
|
||||
presetChangeObserver = NotificationCenter.default.addObserver(
|
||||
forName: .playerControlsActivePresetDidChange,
|
||||
|
||||
Reference in New Issue
Block a user