mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-21 02:19:30 +00:00
downloads and offline playback
This commit is contained in:
parent
1c95d1e4bb
commit
c24541f1cd
38 changed files with 1590 additions and 109 deletions
|
|
@ -17,6 +17,8 @@ import 'widgets/audiobook_player_seek_button.dart';
|
|||
import 'widgets/audiobook_player_seek_chapter_button.dart';
|
||||
import 'widgets/player_speed_adjust_button.dart';
|
||||
|
||||
var pendingPlayerModals = 0;
|
||||
|
||||
class PlayerWhenExpanded extends HookConsumerWidget {
|
||||
const PlayerWhenExpanded({
|
||||
super.key,
|
||||
|
|
@ -270,6 +272,7 @@ class SleepTimerButton extends HookConsumerWidget {
|
|||
message: 'Sleep Timer',
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
pendingPlayerModals++;
|
||||
// show the sleep timer dialog
|
||||
final resultingDuration = await showDurationPicker(
|
||||
context: context,
|
||||
|
|
@ -279,6 +282,7 @@ class SleepTimerButton extends HookConsumerWidget {
|
|||
.sleepTimerSettings
|
||||
.defaultDuration,
|
||||
);
|
||||
pendingPlayerModals--;
|
||||
if (resultingDuration != null) {
|
||||
// if 0 is selected, cancel the timer
|
||||
if (resultingDuration.inSeconds == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue