mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 10:47:25 +01: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.
|
/// 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();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue