fix(eq): resync EstadoEcualizador with car/notification-initiated changes
A toggle from the Android Auto notification or a preset picked from the car's EQ folder mutated PluriWaveAudioHandler state directly, leaving EstadoEcualizador (and therefore the phone UI) unaware and never persisting the change, so it was lost on the next app restart. Forward the handler's ecualizadorActivo flag through ServicioAudio and, mirroring EstadoRadio's existing playFromMediaId resync, diff it plus presetActual against the cached values on every estadoStream tick, adopting and persisting a divergence via ServicioEcualizador.
This commit is contained in:
@@ -582,6 +582,13 @@ class ServicioAudio {
|
||||
bool get ecualizadorDisponible => _handler.ecualizadorDisponible;
|
||||
PresetEcualizador get presetActual => _handler.presetActual;
|
||||
|
||||
/// Forwards the handler's own on/off flag (eq-sync-superficies): a
|
||||
/// car/notification toggle (`accionEqToggle`) mutates
|
||||
/// `PluriWaveAudioHandler._ecualizadorActivo` directly, bypassing
|
||||
/// [setEcualizadorActivo] entirely. [EstadoEcualizador] polls this getter
|
||||
/// on every [estadoStream] tick to detect and resync that divergence.
|
||||
bool get ecualizadorActivo => _handler.ecualizadorActivo;
|
||||
|
||||
Future<void> aplicarPreset(PresetEcualizador preset) =>
|
||||
_handler.aplicarPreset(preset);
|
||||
Future<void> setEcualizadorActivo(bool activo) =>
|
||||
|
||||
Reference in New Issue
Block a user