From 50874eaa852b82daf2d107aad07789f56624308d Mon Sep 17 00:00:00 2001 From: kmac <135567+kmac@users.noreply.github.com> Date: Sun, 13 Jun 2021 22:12:47 -0400 Subject: [PATCH] Release 1.0.16+28 --- CHANGELOG.md | 7 +++++++ lib/components/audio.dart | 9 +-------- lib/components/notifier.dart | 2 +- metadata/en-US/changelogs/28.txt | 6 ++++++ pubspec.yaml | 4 +--- 5 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 metadata/en-US/changelogs/28.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 079020a..c9f4993 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 1.0.16 +- 'Bell' configuration menu is now called 'Sound' +- Add ability to select media channel for notification sound (Issue 31): + - notification (default, as in previous versions) + - media + - alarm + # 1.0.15 - Issue 26: allow to select from existing tags on add/edit - Can also add new tag via manual text diff --git a/lib/components/audio.dart b/lib/components/audio.dart index c7109d1..c96000f 100644 --- a/lib/components/audio.dart +++ b/lib/components/audio.dart @@ -17,7 +17,6 @@ const Map audioChannelForNotification = { class NotifyAudioPlayer { static const String defaultBellAsset = 'media/tibetan_bell_ding_b.mp3'; - final bool disposeOnPlayStop = true; var _player = AudioPlayer(); AudioSession _session; @@ -90,13 +89,7 @@ class NotifyAudioPlayer { await _player.setFilePath(fileToPlay.path); } await _player.play(); // waits until finished playing - if (disposeOnPlayStop) { - dispose(); - } else { - await _player.stop(); // required to turn off _player.playing - _session - .setActive(false); // required to allow other players to regain focus - } + dispose(); } Future dispose() async { diff --git a/lib/components/notifier.dart b/lib/components/notifier.dart index 1b07eee..95c0b97 100644 --- a/lib/components/notifier.dart +++ b/lib/components/notifier.dart @@ -220,7 +220,7 @@ class Notifier { } void playSound(dynamic fileOrPath, ScheduleDataStoreBase ds) { - audioPlayer ??= getAudioPlayer(ds); + audioPlayer = getAudioPlayer(ds); audioPlayer.play(fileOrPath); } diff --git a/metadata/en-US/changelogs/28.txt b/metadata/en-US/changelogs/28.txt new file mode 100644 index 0000000..17790f0 --- /dev/null +++ b/metadata/en-US/changelogs/28.txt @@ -0,0 +1,6 @@ +# 1.0.16 +- 'Bell' configuration menu is now called 'Sound' +- Add ability to select media channel for notification sound (Issue 31): + - notification (default, as in previous versions) + - media + - alarm diff --git a/pubspec.yaml b/pubspec.yaml index 0b77c8d..863c7db 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -21,7 +21,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # This number is used only to determine whether one version is more recent than another, # with higher numbers indicating more recent versions # versionName: Customer-visible version string -version: 1.0.15+27 +version: 1.0.16+28 environment: sdk: ">=2.7.0 <3.0.0" @@ -59,9 +59,7 @@ dependencies: path_provider: ^2.0.2 share: ^2.0.2 dropdown_search: ^0.6.1 - # flutter_treeview: ^1.0.3+2 - # permission_handler: ^6.1.3 # flutter_background_service: ^0.0.1+19 rflutter_alert: ^2.0.2 flutter_markdown: ^0.6.2