mobile: Don't update position if not playing

This commit is contained in:
Elias Projahn 2020-05-13 18:22:39 +02:00
parent b78cf31082
commit 2d96d2fec8

View file

@ -377,9 +377,9 @@ class _PlaybackService extends BackgroundAudioTask {
/// Notify the UI of the new playback position periodically. /// Notify the UI of the new playback position periodically.
Future<void> _updatePosition() async { Future<void> _updatePosition() async {
while (_playing) { while (_playing) {
_sendPosition();
await Future.delayed( await Future.delayed(
const Duration(milliseconds: positionUpdateInterval)); const Duration(milliseconds: positionUpdateInterval));
_sendPosition();
} }
} }