setting to disable early access tools

This commit is contained in:
Fabian Freund
2024-06-05 17:19:43 +02:00
parent 692a962acf
commit bb23870bf8
10 changed files with 149 additions and 63 deletions
@@ -22,9 +22,11 @@ class SettingsScreen extends HookConsumerWidget {
);
final hideSessionText = useState(true);
// final isSavingSettings = ref.watch(
// saveSettingsControllerProvider.select((value) => value.isLoading),
// );
final showEarlyAccessFeatures = ref.watch(
settingsRepositoryProvider.select(
(value) => value.valueOrNull?.showEarlyAccessFeatures ?? true,
),
);
final incognitoEnabled = ref.watch(
settingsRepositoryProvider
@@ -114,6 +116,19 @@ class SettingsScreen extends HookConsumerWidget {
),
),
),
SwitchListTile.adaptive(
title: const Text('Show Early Access Features'),
subtitle: const Text(
"Displays Kagi's early access features in the UI. As an Ultimate subscriber, you will likely want to have this enabled.",
),
value: showEarlyAccessFeatures,
onChanged: (value) async {
await ref.read(saveSettingsControllerProvider.notifier).save(
(currentSettings) => currentSettings.copyWith
.showEarlyAccessFeatures(value),
);
},
),
SwitchListTile.adaptive(
title: const Text('Incognito Mode'),
subtitle: const Text(