diff --git a/lib/data/shared_prefs_service.dart b/lib/data/shared_prefs_service.dart index ab57293..d9861e7 100644 --- a/lib/data/shared_prefs_service.dart +++ b/lib/data/shared_prefs_service.dart @@ -16,7 +16,7 @@ class UserPreferencesService { static const _caffeineKey = "caffeine"; static const _hapticsKey = "haptics"; - + static const _themeTypeKey = "themeType"; static const _primaryColorKey = "primaryColor"; static const _dynamicColorKey = "dynamicColor"; @@ -37,7 +37,7 @@ class UserPreferencesService { bool get caffeine => _sharedPreferences.getBool(_caffeineKey) ?? false; set caffeine(bool value) => _sharedPreferences.setBool(_caffeineKey, value); - bool get haptics => _sharedPreferences.getBool(_hapticsKey) ?? false; + bool get haptics => _sharedPreferences.getBool(_hapticsKey) ?? true; set haptics(bool value) => _sharedPreferences.setBool(_hapticsKey, value); double get cameraEvCalibration => _sharedPreferences.getDouble(_cameraEvCalibrationKey) ?? 0.0; diff --git a/lib/screens/settings/components/haptics/bloc_list_tile_haptics.dart b/lib/screens/settings/components/haptics/bloc_list_tile_haptics.dart index 11058da..df34562 100644 --- a/lib/screens/settings/components/haptics/bloc_list_tile_haptics.dart +++ b/lib/screens/settings/components/haptics/bloc_list_tile_haptics.dart @@ -8,11 +8,8 @@ class HapticsListTileBloc extends Cubit { this._settingsInteractor, ) : super(_settingsInteractor.isHapticsEnabled); - void onHapticsChange(bool value) { + void onHapticsChanged(bool value) { _settingsInteractor.enableHaptics(value); - if (value) { - _settingsInteractor.quickVibration(); - } emit(value); } } diff --git a/lib/screens/settings/components/haptics/widget_list_tile_haptics.dart b/lib/screens/settings/components/haptics/widget_list_tile_haptics.dart index d640106..673fa2c 100644 --- a/lib/screens/settings/components/haptics/widget_list_tile_haptics.dart +++ b/lib/screens/settings/components/haptics/widget_list_tile_haptics.dart @@ -14,7 +14,7 @@ class HapticsListTile extends StatelessWidget { secondary: const Icon(Icons.vibration), title: Text(S.of(context).haptics), value: state, - onChanged: context.read().onHapticsChange, + onChanged: context.read().onHapticsChanged, ), ); }