From 2d96d2fec87d5ae63f8e88b3d3b99a3c818e58a5 Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Wed, 13 May 2020 18:22:39 +0200 Subject: [PATCH] mobile: Don't update position if not playing --- mobile/lib/playback.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/lib/playback.dart b/mobile/lib/playback.dart index 2afe5df..8de2c49 100644 --- a/mobile/lib/playback.dart +++ b/mobile/lib/playback.dart @@ -377,9 +377,9 @@ class _PlaybackService extends BackgroundAudioTask { /// Notify the UI of the new playback position periodically. Future _updatePosition() async { while (_playing) { + _sendPosition(); await Future.delayed( const Duration(milliseconds: positionUpdateInterval)); - _sendPosition(); } }