miniplayer flex fix

This commit is contained in:
Violet Caulfield
2024-12-31 15:48:01 -06:00
parent 9326496143
commit 4b6d2f94a2
2 changed files with 21 additions and 18 deletions

View File

@@ -20,6 +20,7 @@ export default function Icon({ name, onPress, large }: { name: string, onPress?:
return (
<MaterialCommunityIcons
color="white"
name={name}
onPress={() => {
if (onPress)

View File

@@ -32,32 +32,34 @@ export function Miniplayer({ navigation }: { navigation : NavigationHelpers<Para
height={"$6"}
onPress={() => navigation.navigate("Player")}
>
<YStack alignContent="center" flex={1}>
<CachedImage
source={getImageApi(apiClient!)
.getItemImageUrlById(
nowPlaying!.AlbumId,
ImageType.Primary,
{ ...queryConfig.images }
)
}
imageStyle={{
width: 50,
height: 50,
marginRight: 20,
borderRadius: 2,
}}
/>
<CachedImage
source={getImageApi(apiClient!)
.getItemImageUrlById(
nowPlaying!.AlbumId,
ImageType.Primary,
{ ...queryConfig.images }
)
}
imageStyle={{
width: 50,
height: 50,
marginRight: 20,
borderRadius: 2,
flex: 2
}}
/>
</YStack>
<YStack alignContent="flex-start">
<YStack alignContent="flex-start" flex={3}>
<Text bold>{nowPlaying?.title ?? "Nothing Playing"}</Text>
<Text>{nowPlaying?.artist ?? ""}</Text>
</YStack>
<Spacer />
<XStack alignItems="flex-end">
<XStack alignItems="flex-end" flex={1}>
{ playbackState.state === State.Playing && (
<Icon name="pause" large onPress={() => pause()} />
)}