Refactor preferences

This commit is contained in:
problematicconsumer
2024-03-02 22:53:14 +03:30
parent 201ea5e88d
commit 2a994dc348
32 changed files with 1104 additions and 1389 deletions

View File

@@ -57,7 +57,7 @@ class RegionPrefTile extends HookConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) {
final t = ref.watch(translationsProvider);
final region = ref.watch(regionNotifierProvider);
final region = ref.watch(Preferences.region);
return ListTile(
title: Text(t.settings.general.region),
@@ -83,9 +83,7 @@ class RegionPrefTile extends HookConsumerWidget {
},
);
if (selectedRegion != null) {
await ref
.read(regionNotifierProvider.notifier)
.update(selectedRegion);
await ref.read(Preferences.region.notifier).update(selectedRegion);
}
},
);