add setting for readability
This commit is contained in:
@@ -20,7 +20,8 @@ enum _StorageKeys {
|
||||
enableHostList('enable_host_lists'),
|
||||
themeMode('theme_mode'),
|
||||
quickAction('enable_quick_action'),
|
||||
quickActionVoiceInput('enable_quick_action_voice_input');
|
||||
quickActionVoiceInput('enable_quick_action_voice_input'),
|
||||
enableReadability('enable_readability');
|
||||
|
||||
final String key;
|
||||
|
||||
@@ -132,6 +133,13 @@ class SettingsRepository extends _$SettingsRepository {
|
||||
);
|
||||
}
|
||||
|
||||
if (newSettings.enableReadability != oldSettings.enableReadability) {
|
||||
await sharedPreferences.setBool(
|
||||
_StorageKeys.enableReadability.key,
|
||||
newSettings.enableReadability,
|
||||
);
|
||||
}
|
||||
|
||||
ref.invalidateSelf();
|
||||
}
|
||||
}
|
||||
@@ -162,6 +170,8 @@ class SettingsRepository extends _$SettingsRepository {
|
||||
parseKagiTool(sharedPreferences.getInt(_StorageKeys.quickAction.key)),
|
||||
quickActionVoiceInput:
|
||||
sharedPreferences.getBool(_StorageKeys.quickActionVoiceInput.key),
|
||||
enableReadability:
|
||||
sharedPreferences.getBool(_StorageKeys.enableReadability.key),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ part of 'settings_repository.dart';
|
||||
// **************************************************************************
|
||||
|
||||
String _$settingsRepositoryHash() =>
|
||||
r'34d3c771d6ebb17cb9aa41211e035b4d1cbf2183';
|
||||
r'f7c42efda64f0fb647e5daf0a92c2d118596cc52';
|
||||
|
||||
/// See also [SettingsRepository].
|
||||
@ProviderFor(SettingsRepository)
|
||||
|
||||
Reference in New Issue
Block a user