From 8a783272bbce6e2d90106fa6e34776a33d6b709a Mon Sep 17 00:00:00 2001 From: MSOB7YY Date: Thu, 3 Oct 2024 18:12:54 +0300 Subject: [PATCH] fix: not resuming after 7 seconds of track failed play dialog --- lib/base/audio_handler.dart | 3 ++- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/base/audio_handler.dart b/lib/base/audio_handler.dart index 564affc7..a8bc2eb8 100644 --- a/lib/base/audio_handler.dart +++ b/lib/base/audio_handler.dart @@ -537,7 +537,8 @@ class NamidaAudioVideoHandler extends BasicAudioHandler { final hadPermissionBefore = await Permission.manageExternalStorage.isGranted; if (checkInterrupted()) return; if (hadPermissionBefore) { - pause(); + final wasPlayWhenReady = willPlayWhenReady; + onPauseRaw().then((_) => setPlayWhenReady(wasPlayWhenReady)); cancelPlayErrorSkipTimer(); playErrorRemainingSecondsToSkip.value = 7; diff --git a/pubspec.yaml b/pubspec.yaml index 856d16eb..2d18a0f4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: namida description: A Beautiful and Feature-rich Music Player, With YouTube & Video Support Built in Flutter publish_to: "none" -version: 4.5.19-beta+241003149 +version: 4.5.2-beta+241003152 environment: sdk: ">=3.4.0 <4.0.0"