mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-10 04:59: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
|
|
@ -28,6 +28,9 @@ class SleepTimer {
|
|||
/// The timer that will pause the player
|
||||
Timer? timer;
|
||||
|
||||
/// is the sleep timer actively counting down
|
||||
bool get isActive => timer != null && timer!.isActive;
|
||||
|
||||
/// for internal use only
|
||||
/// when the timer was started
|
||||
DateTime? startedAt;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class SleepTimer extends _$SleepTimer {
|
|||
void restartTimer() {
|
||||
state?.restartTimer();
|
||||
|
||||
ref.notifyListeners();
|
||||
// ref.notifyListeners(); // see https://github.com/Dr-Blank/Vaani/pull/40 for more information on why this is commented out
|
||||
}
|
||||
|
||||
void cancelTimer() {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'sleep_timer_provider.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$sleepTimerHash() => r'9d9f20267da91e5483151b58b7d4d7c0762c3ca7';
|
||||
String _$sleepTimerHash() => r'4f80bcc342e918c70c547b8b24790ccd88aba8c3';
|
||||
|
||||
/// See also [SleepTimer].
|
||||
@ProviderFor(SleepTimer)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue