mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-08-02 17:18:36 +02:00
fix(player): refresh lyrics after automatic track changes
This commit is contained in:
@@ -186,7 +186,13 @@ class _NowPlayingScreenState extends ConsumerState<NowPlayingScreen> {
|
||||
super.initState();
|
||||
_mediaItemSub = ref.listenManual<AsyncValue<MediaItem?>>(
|
||||
currentMediaItemProvider,
|
||||
(previous, next) => _loadMetadataForItem(next.value),
|
||||
(previous, next) => _loadMetadataForItem(
|
||||
next.value,
|
||||
// When automatic playback advances while Lyrics is already visible,
|
||||
// onPageChanged will not run again. Inspect an unresolved SAF URI now
|
||||
// instead of leaving the new track with an empty Lyrics page.
|
||||
inspectUnresolvedContentUri: _currentPage == 1,
|
||||
),
|
||||
);
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (!mounted) return;
|
||||
|
||||
Reference in New Issue
Block a user