This commit is contained in:
2025-10-09 16:21:42 +02:00
parent 078dc51070
commit 38504840b9
8 changed files with 151 additions and 69 deletions
@@ -1,4 +1,3 @@
import useSharedAudioPlayer from "../../../hooks/useSharedAudioPlayer";
import { BlurView } from "expo-blur";
import React, {
useCallback,
@@ -24,6 +23,7 @@ import {
projectsRef,
usersRef,
} from "../../../config/firebase";
import useSharedAudioPlayer from "../../../hooks/useSharedAudioPlayer";
import { Routes } from "../../../navigation";
import { navigate } from "../../../navigation/NavigationService";
import { useUser } from "../../../providers/UserDataProvider";
@@ -145,7 +145,11 @@ const PlaybackItem = ({
}, [item?.likedBy, currentUID]);
const audioPlayer = useSharedAudioPlayer(audioSource || undefined, {
id: item?.id ? `playback-${item.id}` : audioSource?.uri ? `playback-${audioSource.uri}` : undefined,
id: item?.id
? `playback-${item.id}`
: audioSource?.uri
? `playback-${audioSource.uri}`
: undefined,
title: typeof item?.title === "string" ? item.title : "",
artist: typeof item?.userName === "string" ? item.userName : "",
artwork: item?.coverUrl || null,
@@ -521,13 +525,16 @@ const PlaybackItem = ({
navigate(Routes.SingerProfile, { userId: item?.userId });
}}
>
{owner?.profilePictureURL ? (
{owner?.profilePictureURL && (
<Image
source={{ uri: owner.profilePictureURL }}
style={styles.ownerAvatar}
style={[
styles.ownerAvatar,
owner && !owner.profilePictureURL
? { backgroundColor: Palette.gray }
: null,
]}
/>
) : (
<Image source={img.profile} style={styles.ownerAvatar} />
)}
</Pressable>
{owner?.id && currentUID && owner.id !== currentUID && (