mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-25 19:27:24 +02:00
mobile: Don't update position if not playing
This commit is contained in:
parent
b78cf31082
commit
2d96d2fec8
1 changed files with 1 additions and 1 deletions
|
|
@ -377,9 +377,9 @@ class _PlaybackService extends BackgroundAudioTask {
|
|||
/// Notify the UI of the new playback position periodically.
|
||||
Future<void> _updatePosition() async {
|
||||
while (_playing) {
|
||||
_sendPosition();
|
||||
await Future.delayed(
|
||||
const Duration(milliseconds: positionUpdateInterval));
|
||||
_sendPosition();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue