Skip to content

Commit

Permalink
Release 1.0.16+28
Browse files Browse the repository at this point in the history
  • Loading branch information
kmac committed Jun 14, 2021
1 parent e5afb0e commit 50874ea
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 1 addition & 8 deletions lib/components/audio.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const Map<String, AndroidAudioUsage> audioChannelForNotification = {

class NotifyAudioPlayer {
static const String defaultBellAsset = 'media/tibetan_bell_ding_b.mp3';
final bool disposeOnPlayStop = true;

var _player = AudioPlayer();
AudioSession _session;
Expand Down Expand Up @@ -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<void> dispose() async {
Expand Down
2 changes: 1 addition & 1 deletion lib/components/notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class Notifier {
}

void playSound(dynamic fileOrPath, ScheduleDataStoreBase ds) {
audioPlayer ??= getAudioPlayer(ds);
audioPlayer = getAudioPlayer(ds);
audioPlayer.play(fileOrPath);
}

Expand Down
6 changes: 6 additions & 0 deletions metadata/en-US/changelogs/28.txt
Original file line number Diff line number Diff line change
@@ -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
4 changes: 1 addition & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 50874ea

Please sign in to comment.