mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-06 11:09:28 +00:00
Fix Shake Detector not working when app in background (#40)
* feat: update shake detection settings to reduce cooldown and feedback options * fix: shake detector not detecting in background * enhance shake action handling to avoid unnecessary feedback * disable shake detector when player not playing anything * refactor: remove outdated TODO regarding shake detection optimization * refactor: comment out notifyListeners call in restartTimer method for clarity
This commit is contained in:
parent
6c0265fe5f
commit
67d6c9240b
10 changed files with 93 additions and 47 deletions
|
|
@ -2633,11 +2633,10 @@ class _$ShakeDetectionSettingsImpl implements _ShakeDetectionSettings {
|
|||
this.threshold = 5,
|
||||
this.shakeAction = ShakeAction.resetSleepTimer,
|
||||
final Set<ShakeDetectedFeedback> feedback = const {
|
||||
ShakeDetectedFeedback.vibrate,
|
||||
ShakeDetectedFeedback.beep
|
||||
ShakeDetectedFeedback.vibrate
|
||||
},
|
||||
this.beepVolume = 0.5,
|
||||
this.shakeTriggerCoolDown = const Duration(seconds: 5),
|
||||
this.shakeTriggerCoolDown = const Duration(seconds: 2),
|
||||
this.shakeTriggerCount = 2,
|
||||
this.samplingPeriod = const Duration(milliseconds: 100)})
|
||||
: _feedback = feedback;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue