feat(ecualizador): include equalizer on/off toggle in export/import
The backup envelope carried favorites, EQ presets, alarms and the multi-device toggle but not EstadoEcualizador's own on/off flag, so restoring a backup on another device silently kept that device's existing toggle state instead of the source device's. Bumps the backup schema to v4 (additive over v3): the flag is only written when explicitly provided, so old exports stay at v2/v3. Importing an old backup without the field leaves the current toggle untouched rather than defaulting it. Applying the imported value reuses EstadoEcualizador.cambiarActivo so it persists and pushes to the live audio engine exactly like a manual toggle.
This commit is contained in:
@@ -414,6 +414,17 @@ class FakeServicioEcualizador extends ServicioEcualizador {
|
||||
);
|
||||
}
|
||||
|
||||
/// Overridden like every other write below: without this, calls fall
|
||||
/// through to the real `ServicioEcualizador.guardarConfiguracion`, which
|
||||
/// hits real SharedPreferences and needs a Flutter test binding — a
|
||||
/// footgun for any test that reaches `EstadoEcualizador.importarConfiguracion`
|
||||
/// (the backup-import path) through this Fake without also wiring
|
||||
/// `TestWidgetsFlutterBinding`/mock prefs.
|
||||
@override
|
||||
Future<void> guardarConfiguracion(ConfiguracionEcualizador config) async {
|
||||
_config = config;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> guardarPorEmisora(String uuid, PresetEcualizador preset) async {
|
||||
final mapa = Map<String, PresetEcualizador>.from(_config.porEmisora);
|
||||
|
||||
Reference in New Issue
Block a user