mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-19 15:59:36 +00:00
111
This commit is contained in:
parent
36f14dbd58
commit
5abf938dcf
26 changed files with 104 additions and 70 deletions
|
|
@ -33,7 +33,7 @@ class ShakeDetector extends _$ShakeDetector {
|
|||
}
|
||||
|
||||
// if no book is loaded, shake detection should not be enabled
|
||||
final player = ref.watch(audioPlayerProvider);
|
||||
final player = ref.watch(absPlayerProvider);
|
||||
player.playerStateStream.listen((event) {
|
||||
if (event.processingState == AbsProcessingState.idle && wasPlayerLoaded) {
|
||||
_logger.config('Player is now not loaded, invalidating');
|
||||
|
|
@ -89,7 +89,7 @@ class ShakeDetector extends _$ShakeDetector {
|
|||
ShakeAction shakeAction, {
|
||||
required Ref ref,
|
||||
}) {
|
||||
final player = ref.read(audioPlayerProvider);
|
||||
final player = ref.read(absPlayerProvider);
|
||||
if (player.book == null && shakeAction.isPlaybackManagementEnabled) {
|
||||
_logger.warning('No book is loaded');
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue