Compare commits

...
4 changed files with 48 additions and 64 deletions

No files matched your search

@@ -81,8 +81,7 @@ export default function AlbumScreen() {
const playOrigin = fromDownloads
? downloadsQueueOrigin(`album:${id}`)
: `album:${id}`
const { isAlbumFavorite, toggleAlbumFavorite, isSongFavorite } =
useFavorites()
const { isSongFavorite } = useFavorites()
const {
handleAlbumDetailAction,
handleAlbumTrackAction,
@@ -205,7 +204,6 @@ export default function AlbumScreen() {
}
const metadata = formatMetadata(album.genre, album.year)
const favorited = isAlbumFavorite(album.id)
return (
<>
@@ -301,42 +299,6 @@ export default function AlbumScreen() {
heroLayout.landscape && { flexDirection: "row-reverse" },
]}
>
<Pressable
onPress={() => void toggleAlbumFavorite(album.id)}
hitSlop={8}
style={[
styles.iconAction,
{ backgroundColor: palette.surface },
]}
>
<Ionicons
name={favorited ? "star" : "star-outline"}
size={24}
color={favorited ? palette.accent : palette.foreground}
/>
</Pressable>
<CollectionDownloadButton
target={downloadTarget}
color={palette.foreground}
style={[
styles.iconAction,
{ backgroundColor: palette.surface },
]}
/>
<Button
title="Play"
icon="play"
onPress={() =>
void (fromDownloads
? playInOrder(songIds, playOrigin)
: playAlbum(album.id, songIds))
}
style={styles.playButton}
tint={{
background: palette.accent,
foreground: palette.accentForeground,
}}
/>
<Pressable
accessibilityRole="button"
accessibilityLabel="Shuffle"
@@ -357,6 +319,28 @@ export default function AlbumScreen() {
color={palette.foreground}
/>
</Pressable>
<Button
title="Play"
icon="play"
onPress={() =>
void (fromDownloads
? playInOrder(songIds, playOrigin)
: playAlbum(album.id, songIds))
}
style={styles.playButton}
tint={{
background: palette.accent,
foreground: palette.accentForeground,
}}
/>
<CollectionDownloadButton
target={downloadTarget}
color={palette.foreground}
style={[
styles.iconAction,
{ backgroundColor: palette.surface },
]}
/>
</View>
}
>
@@ -643,11 +643,15 @@ const PlaylistHero = memo(function PlaylistHero({
/>
</Pressable>
) : null}
<CollectionDownloadButton
target={downloadTarget}
color={palette.foreground}
<Pressable
accessibilityRole="button"
accessibilityLabel="Shuffle"
hitSlop={8}
onPress={onShuffle}
style={[styles.iconAction, { backgroundColor: palette.surface }]}
/>
>
<Ionicons name="shuffle" size={24} color={palette.foreground} />
</Pressable>
<Button
title="Play"
icon="play"
@@ -658,15 +662,11 @@ const PlaylistHero = memo(function PlaylistHero({
foreground: palette.accentForeground,
}}
/>
<Pressable
accessibilityRole="button"
accessibilityLabel="Shuffle"
hitSlop={8}
onPress={onShuffle}
<CollectionDownloadButton
target={downloadTarget}
color={palette.foreground}
style={[styles.iconAction, { backgroundColor: palette.surface }]}
>
<Ionicons name="shuffle" size={24} color={palette.foreground} />
</Pressable>
/>
</View>
}
>
@@ -197,17 +197,6 @@ const FavoritesHero = memo(function FavoritesHero({
backgroundColor={colors.background}
/>
<View style={styles.actions}>
<CollectionDownloadButton
target={downloadTarget}
color={colors.foreground}
style={[styles.iconAction, { backgroundColor: colors.muted }]}
/>
<Button
title="Play"
icon="play"
onPress={onPlay}
style={styles.playButton}
/>
<Pressable
accessibilityRole="button"
accessibilityLabel="Shuffle"
@@ -217,6 +206,17 @@ const FavoritesHero = memo(function FavoritesHero({
>
<Ionicons name="shuffle" size={24} color={colors.foreground} />
</Pressable>
<Button
title="Play"
icon="play"
onPress={onPlay}
style={styles.playButton}
/>
<CollectionDownloadButton
target={downloadTarget}
color={colors.foreground}
style={[styles.iconAction, { backgroundColor: colors.muted }]}
/>
</View>
</View>
<CollectionDivider />
@@ -120,8 +120,8 @@ export function CollectionDownloadButton({
/>
) : (
<Ionicons
name={done ? "checkmark-circle" : "arrow-down-circle-outline"}
size={SIZE + 2}
name={done ? "checkmark" : "arrow-down"}
size={24}
color={color}
/>
)}