mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-08 12:00:25 -06:00
maybe this?
This commit is contained in:
@@ -183,7 +183,8 @@ const PlayerContextInitializer = () => {
|
||||
|
||||
case (Event.PlaybackActiveTrackChanged) : {
|
||||
|
||||
const activeTrack = event.track as JellifyTrack | undefined;
|
||||
// Use await instead of event value to prevent flickering in UI
|
||||
const activeTrack = await TrackPlayer.getActiveTrack() as JellifyTrack | undefined;
|
||||
if (activeTrack && !isEqual(activeTrack, nowPlaying)) {
|
||||
setNowPlaying(activeTrack);
|
||||
setNowPlayingIsFavorite((await fetchUserData(apiClient!, activeTrack!.item.Id!)).IsFavorite ?? false);
|
||||
|
||||
Reference in New Issue
Block a user