diff --git a/apps/mobile/app/(app)/(tabs)/home/browse/songs.tsx b/apps/mobile/app/(app)/(tabs)/home/browse/songs.tsx index 4db3dfa..f472ac0 100644 --- a/apps/mobile/app/(app)/(tabs)/home/browse/songs.tsx +++ b/apps/mobile/app/(app)/(tabs)/home/browse/songs.tsx @@ -2,7 +2,10 @@ import { usePaginatedQuery } from "convex/react" import { useState } from "react" import { FlatList, Pressable, StyleSheet, Text, View } from "react-native" -import { MediaActionsSheet, type MediaAction } from "@/components/media-actions-sheet" +import { + MediaActionsSheet, + type MediaAction, +} from "@/components/media-actions-sheet" import { contentBottomInset, SongRow } from "@/components/player" import { LoadingView } from "@/components/ui/primitives" import { useAddToPlaylist } from "@/contexts/add-to-playlist" @@ -18,7 +21,8 @@ const PAGE_SIZE = 50 export default function SongsScreen() { const colors = useThemeColors() - const { playFromLibrarySong, addToQueueNext, addToQueueLast, playShuffled } = usePlayback() + const { playFromLibrarySong, addToQueueNext, addToQueueLast, playShuffled } = + usePlayback() const { openAddToPlaylist } = useAddToPlaylist() const { isSongFavorite, toggleSongFavorite } = useFavorites() const [sortKey, setSortKey] = useState<"title" | "artist" | "album">("title") @@ -48,10 +52,14 @@ export default function SongsScreen() { openAddToPlaylist(songIds) break case "play-next": - void addToQueueNext(songIds).then(() => showSuccess("Queued to play next")) + void addToQueueNext(songIds).then(() => + showSuccess("Queued to play next") + ) break case "play-last": - void addToQueueLast(songIds).then(() => showSuccess("Queued to play last")) + void addToQueueLast(songIds).then(() => + showSuccess("Queued to play last") + ) break case "shuffle": void playShuffled(songIds) @@ -69,23 +77,7 @@ export default function SongsScreen() { } return ( - - - {(["title", "artist", "album"] as const).map((key) => ( - cycleSort(key)} style={styles.sortButton}> - - {key[0].toUpperCase() + key.slice(1)} - {sortKey === key ? (sortDirection === "asc" ? " ↑" : " ↓") : ""} - - - ))} - - + <> item.id} @@ -99,7 +91,10 @@ export default function SongsScreen() { - void playFromLibrarySong(item.id as Id<"songs">, { sortKey, sortDirection }) + void playFromLibrarySong(item.id as Id<"songs">, { + sortKey, + sortDirection, + }) } onLongPress={() => setActionSong(item)} /> @@ -113,7 +108,7 @@ export default function SongsScreen() { onClose={() => setActionSong(null)} onAction={handleAction} /> - + ) }