mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-07 19:49:29 +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
|
|
@ -197,12 +197,12 @@ class ShakeDetectionSettings with _$ShakeDetectionSettings {
|
|||
@Default(ShakeDirection.horizontal) ShakeDirection direction,
|
||||
@Default(5) double threshold,
|
||||
@Default(ShakeAction.resetSleepTimer) ShakeAction shakeAction,
|
||||
@Default({ShakeDetectedFeedback.vibrate, ShakeDetectedFeedback.beep})
|
||||
@Default({ShakeDetectedFeedback.vibrate})
|
||||
Set<ShakeDetectedFeedback> feedback,
|
||||
@Default(0.5) double beepVolume,
|
||||
|
||||
/// the duration to wait before the shake detection is enabled again
|
||||
@Default(Duration(seconds: 5)) Duration shakeTriggerCoolDown,
|
||||
@Default(Duration(seconds: 2)) Duration shakeTriggerCoolDown,
|
||||
|
||||
/// the number of shakes required to trigger the action
|
||||
@Default(2) int shakeTriggerCount,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue