From cc99d4d772be6635639a0d398076a8890f4e6a42 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Tue, 23 Jan 2024 15:51:45 -0500 Subject: Connect audio settings button Rework to connect the audio settings button on the media pages to the appropriate settings page, and have the back button go back to the expected previous page. To enable this, the global AppState provider was reworked to track the previous page and add explicit update and back member functions. Bug-AGL: SPEC-5030 Change-Id: I5858d1b1bf511a184b6538b2ce8c183b00c24fc6 Signed-off-by: Scott Murray --- lib/presentation/screens/media/play_list_table.dart | 3 +++ lib/presentation/screens/media/radio_preset_table.dart | 3 +++ 2 files changed, 6 insertions(+) (limited to 'lib/presentation/screens/media') diff --git a/lib/presentation/screens/media/play_list_table.dart b/lib/presentation/screens/media/play_list_table.dart index 71d2fc9..28cb970 100644 --- a/lib/presentation/screens/media/play_list_table.dart +++ b/lib/presentation/screens/media/play_list_table.dart @@ -61,6 +61,9 @@ class _PlayListTableState extends ConsumerState { onTap: () { setState(() { isAudioSettingsEnabled = !isAudioSettingsEnabled; + ref + .read(appProvider.notifier) + .update(AppState.audioSettings); }); }, child: Padding( diff --git a/lib/presentation/screens/media/radio_preset_table.dart b/lib/presentation/screens/media/radio_preset_table.dart index 97affb8..fcf8e2b 100644 --- a/lib/presentation/screens/media/radio_preset_table.dart +++ b/lib/presentation/screens/media/radio_preset_table.dart @@ -64,6 +64,9 @@ class _RadioPresetTableState extends ConsumerState { onTap: () { setState(() { isAudioSettingsEnabled = !isAudioSettingsEnabled; + ref + .read(appProvider.notifier) + .update(AppState.audioSettings); }); }, child: Padding( -- cgit 1.2.3-korg